ELK M1: setting custom entity ids for tasks

I have task 001 defined in my Elk. The elkm1 integration detects it and makes it available as switch.elkm1_task_001. I can trigger it just fine. I’ve also given it a “friendly name”.

There’s one thing I have not figured out how to do. How can I change the entity_id to something nicer than switch.elkm1_task_001? For all Z-Wave devices, I’ve set a nice name and entity_id which are more meaningful than the defaults that HA assigns. I do this by clicking on the icon of the device I want to change and then click on the “gear” icon which appears next to the name of the device. Like in this screenshot:


Then I get a popup that allows changing the name and entity_id.

This little gear however does not show up for the device that corresponds to my Elk task. I was able to set the friendly name by editing customize.yaml but I’m not seeing a way to change the task’s entity_id. I want to refer to it as switch.name_that_describe_what_the_task_does rather than switch.elkm1_task_001.

Thank you.

I’m not aware that the entity_id is editable. If you find out otherwise I would like to see.

The Elk code sets the entity_id when the HASS device is created.

I’m unclear as to what the scope of your statements are. Generally, it is definitely possible to set a entity_id for entities. I’ve described in my original post how it can be done. The changes made through the GUI used are stored in .storage/core.entity_registry.

The Elk integration does not currently allow it but I am inferring from what I was able to find that this is a function of the way the Elk integration is currently implemented. One thing needed to be able to set entity_id is another id which does not ever change. All the entries in .storage/core.entity_registry have a unique_id field. I went and checked the implementation of ZWave entities and of Cast media player entities: they both set a unique_id field, whereas the Elk integration does not. However, I don’t know if that’s the only thing needed to allow assigning entity_id.

Unfortunately, the dev documentation is not very verbose about unique_id.

Trying to figure this out. Easy enough to create a unique_id instead of entity_id. Trying to understand what this means to finding referencing devices.

Specific example is that I need to be able to find a keypad from an alarm control panel in an automation.

See this post for an idea: ELK M1 Interface

@gwww I’ve upgraded to HA 0.81, which has the Elk M1 support merged in. I still cannot give my own entity_id to elk tasks. They used to be switches in HA, and they are now scenes, fine, but if I click on the name or logo of a scene associated with an Elk task, I do not get any popup allowing me to change entity_id.

It looks like sensors and keypads originating from the elkm1 component can get custom entity_id (I’ve not tried it but I can get to the fields necessary for it), but scenes cannot.

Works for me. Developer tools --> States; select the task and give it a name/entity_id.

1 Like

Yes, I can do it from there. Thanks for the information.

In my view, there’s still a bug though, but I’m thinking the bug might be in HA itself, because for every other device that originates with a component, I can edit the name and entity_id in Overview. I don’t have to go to the states page to do it. The fact that I cannot do it with the scenes is inconsistent.