Closed tache closed 4 months ago
If we can pull in whatever name the user has assigned in the Kidde app, that would probably be ideal.
Actually was looking at the code this seems like a fairly simple change, in the interest of always providing unique IDs the serial or the device ID to build the entity ID while using the name set by the user in the app to define the friendly name / device name would be ideal.
That way regardless if the user changes the name in the Kidde app all their automations will continue to work if they're using entity IDs based on serial / device ID.
I also would love to have the label, but I agree with your comment on the change aspect. I would prefer to have the serial_number
because that seems to be the MAC ID, and it would allow easy lookup in network management apps.
Agreed, I am hoping setting the friendly name by default to something like [Label] [Sensor Name] "Bedroom Air Pressure" will still make it super easy to search via the home assistant UI for creating automation while also ensuring IDs remain consistent and unique regardless of reinstalling the integration, etc.
Btw thank you for taking on the work of maintaining this, I just purchased 7 of these and very happy to see an integration.
nit: the comment
Added a unique entity id based on the serial_number to names. (@nberardi)
should read
Added a unique entity id based on name, and serial_number to entity. (@nberardi)
the unique identity is based on HA's own algorithm for naming.
Updated release comment - Thanks!
Checklist
Is your feature request related to a problem? Please describe.
no
Describe the solution you'd like
Currently, Home Assistant entity ID names are listed in the form
entity_type.property
, i.e.,sensor.air_pressure
,binary_sensor.smoke_alarm
, orbutton.test
. When multiple devices are present, they are listed assensor.air_pressure
,sensor.air_pressure_2
, orsensor.air_pressure_3
. It would be nice to have the items also include some identifying information about the owning device.Some example information that is available using the Kidde JSON properties:
label
:sensor.hallway_air_pressure
,sensor.basement_air_pressure
ID
:sensor.54879_air_pressure
,sensor.36854_air_pressure
serial_number
(also the MAC):sensor.08EB4BE3FDC8_air_pressure
,sensor.019C2AFE7AE3_air_pressure
announcement
(announcement can be different than the label):sensor.hallway_air_pressure
,sensor.basement_air_pressure
Describe alternatives you've considered
Provide each entity with a manual name. This does not change the entity ID. See the additional context picture.
Additional context
Example Entities with one name change
Example confusion with selecting entities