aboutsummaryrefslogtreecommitdiff
path: root/examples/common
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2026-01-19 20:10:35 +0000
committerdiogo464 <[email protected]>2026-01-19 20:10:36 +0000
commitaa47d88882d9bd6c7753315c8fe1b9b2e9b21fa7 (patch)
tree12c9e9031a04c169a8218c4028a78ebff036d8f5 /examples/common
parent27779ecf0d7c00ae0acb650c0d75d28edcc3aa89 (diff)
fix: prefix discovery unique_id with device id
right now we use the entity id as the unique_id in the entity discovery payload but we should have been prefixing it with the device_id like with did for the topics to avoid generating collisions. for example if we have devices 'relay_0' and 'relay_1' and they both have a button entity with id 'trigger' then the topics will be correctly generated using the id 'relay_0_trigger' and 'relay_1_trigger' but the unique id field in the discovery payload is being set as 'trigger' for both entities which causes this type of error to show up on the home assistant logs: 2026-01-19 19:52:07.539 ERROR (MainThread) [homeassistant.components.button] Platform mqtt does not generate unique IDs. ID open already exists - ignoring button.porta_frente_abri │ │ 2026-01-19 19:52:07.611 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID wifi-rssi already exists - ignoring sensor.porta_frente │ │ 2026-01-19 19:56:08.013 ERROR (MainThread) [homeassistant.components.button] Platform mqtt does not generate unique IDs. ID open already exists - ignoring button.porta_frente_abri │ │ 2026-01-19 19:56:08.067 ERROR (MainThread) [homeassistant.components.sensor] Platform mqtt does not generate unique IDs. ID wifi-rssi already exists - ignoring sensor.porta_frente |
Diffstat (limited to 'examples/common')
0 files changed, 0 insertions, 0 deletions