I’m putting this here for others, as I’m pretty sure you’ve got your mind made up and are just here to complain.
Fancy you can do it better? Fork the repo. Change the code to suit your needs. Don’t expect the devs of this free software to shift their direction to suit you. As a JSON formatted (Key/Value) file, the “undocumented” device registry isn’t particularly hard to read or understand. You’ve got a list of devices, and those devices have attributes. We aren’t editing hex here.
For everyone else:
My guess is that the devs have a plan for the changing of automations with missing devices, but this software is in frequent development and things change all the time. 0.115<1.0, after all. So many things have changed in the last 8 months I’ve been using it, and has shown me the team is excited and eager to make this as user-friendly as possible.
Now, examples from my setup. No need to edit .storage/core.device_registry, just run a find on the device’s name. (In my case, “KodiLivingRoom”).
The “id:” here in this entry corresponds to “device_id:” in the Automations.yaml.
Mine:
{
"config_entries": [
"5145472efa6c11eaa7e943e297677d8b"
],
"connections": [],
"identifiers": [
[
"kodi",
"9f7bd49c-ef85-4f8b-9c7d-8860fea7d003"
]
],
"manufacturer": "Kodi",
"model": null,
"name": "KodiLivingRoom",
"sw_version": "18.8",
"entry_type": null,
"id": "5149e4c0fa6c11ea811d2beece028f9b",
"via_device_id": null,
"area_id": "85455ebc94c548c58a1ba9eef74199ff",
"name_by_user": null
}
Your entity id is right there (as “id”). Copy it.
And the corresponding automation entry from automations.yaml:
- id: '1600571146194'
alias: Turn on Kodi Livingroom
description: ''
trigger:
- platform: device
device_id: 5149e4c0fa6c11ea811d2beece028f9b
domain: kodi
entity_id: media_player.kodilivingroom
type: turn_on
condition: []
action:
- service: kodi.call_method
data:
method: Addons.ExecuteAddon
addonid: script.json-cec
params:
command: activate
entity_id: media_player.kodilivingroom
- service: switch.turn_on
data: {}
entity_id: switch.ambilightcontrol
mode: single
Make a backup copy of the automations.yaml, then literally copy the “id” from the core.device_registry entry and paste it into “device_id” of the automation in automations.yaml. Make sure quote marks and commas are removed when pasting. Not particularly hard, a bit daunting for the inexperienced perhaps. No chance of permanently breaking anything useful, even if you’ve made a backup. Restart home assistant. Voilà.