Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automation definitions don't accept friendly_name #9558

Closed
lmamakos opened this issue Sep 24, 2017 · 5 comments
Closed

automation definitions don't accept friendly_name #9558

lmamakos opened this issue Sep 24, 2017 · 5 comments

Comments

@lmamakos
Copy link

Make sure you are running the latest version of Home Assistant before reporting an issue.

You should only file an issue if you found a bug. Feature and enhancement requests should go in the Feature Requests section of our community forum:

Home Assistant release (hass --version):
0.54.0

Python release (python3 --version):
Python 3.5.4

Component/platform:
automation

Description of problem:
Not possible to specify a friendly_name for an automation. This is surprising since the entity has a friendly_name attribute

Expected:
Have the alias: specification be used to construct the entity_id, but friendly_name: to specify the name seen in the UI

Problem-relevant configuration.yaml entries and steps to reproduce:

- alias: minimote2 scene 8
  friendly_name: minimote2 scene 8 - button 4 long press
  # - button 4 long press
  initial_state: True
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data:
      entity_id: zwave.minimote2
      scene_id: 8
  action:
    service: input_boolean.turn_on
    entity_id: input_boolean.bedtime

Traceback (if applicable):

2017-09-24 00:13:16 ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [friendly_name] is an invalid option for [automation]. Check: automation->friendly_name. (See /Users/louie/homeassistant/config/configuration.yaml, line 52). Please check the docs at https://home-assistant.io/components/automation/

Additional info:
Unexpected behavior, but not a show-stopper.

@BertrumUK
Copy link

Remove the dash after “scene 8”. Think only underscore will work _ not -

@arsaboo
Copy link
Contributor

arsaboo commented Sep 24, 2017

Automations use alias to define friendly_name. Just replace friendly_name with alias and you will get the desired results.

Having said that, I agree that it might be confusing as we use friendly_name elsewhere.

@lmamakos
Copy link
Author

I get how a - character isn't valid as part of an entity name (though it does work in the alias: name). I tried removing it, and it didn't allow me to specify a friendly_name here.

The alias: specification also seems to be used to specify the entity_id that gets generated. I happened across that and thought I would "clean things up" by using a somewhat more terse name so that the entity_name wasn't so long. I had occasion to go to the UI to turn-on the automations after an upgrade where I trashed the home assistant database file to re-enable them. This is where I noticed the names where were not ideal.

Again, this sure isn't anything like a high-priority (or even low-priority) issue for me, just trying to explain how I stumbled across this and that I was surprised by it. I can certainly live with the status-quo without any issues.

It would be nice to update the documentation and make it clear that the initial_state: specification might be useful. I was surprised after an upgrade that some automations stopped working and it took a little while to realize a bunch of them got disabled along the way, probably due to the database problem. (I just deleted it since VACUUM; was taking.. forever..)

@balloobbot
Copy link

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍

@balloobbot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants