Home-Assistant-custom-components-Google-Keep
Home-Assistant-custom-components-Google-Keep copied to clipboard
Sensor Entity ID changes when adding new entries to Google Keep
The component works fine, but as soon as I add another list to my Google Keep, or change the structure of the existing list, the integration seems to generate and change the existing sensor in HA which stops all my Lovelace dashboards that relate to the old sensor ID. On resolved issues I see another user had the same issue, but didnt mention how to fix it. Seems similar to https://github.com/PiotrMachowski/Home-Assistant-custom-components-Google-Keep/issues/2
For example: sensor.google_keep_de744de52b was sensor.google_keep__somethingelse_
Hi. Just added the integration and confirm the same. My sensors keep chaning the name :-/
Used in configuration.yaml:
- platform: google_keep
name: "keepsensor"
username: #########
password: #######
labels:
- 'Home Assistant'
pinned: true
When the widget is set to the sensor name it works fine:
type: custom:google-keep-card
entity: sensor.keepsensor_fa63f123b0
show:
- checked
- unchecked
But the ID changes ...
This is also true by simply "pinning" or "unpinning" a List. Setting a name will still lead to a new ID. Is it somehow possible that the sensor name doesn't change when proving a friendly name?
Would be cool if we could just set the entity name in yaml rather than this autogenerated ID that keeps changing.
edit: Its weird though - i just added another list, pinned it, and it updated the existing sensor just fine. Yesterday i went in an pinned 2 lists, added pinned: true and restarted, and got a new entity name. Maybe it was the change to the integration config itself that triggered it? Or maybe the reboot.
At this moment entity id should change only when you change configuration of a sensor, is it correct or does it change without config changes?
Doing further testing now to confirm.
Unpinned a list, rebooted, pinned it again and added another list for good measure. ID unchanged. Seems that it was only modifying the sensor in configuration.yaml that did it, as you say.
Totally livable quirk, but it would be better if we could set the friendly name in yaml.
At this moment entity id should change only when you change configuration of a sensor, is it correct or does it change without config changes?
it is working like you expect it, but that is a strange behaviour - when I make a configuration change, it creates a new entity id which I need to manually update any reference to it, and then I can't delete the old id.... Can you please add a ay to provide a custom entity id?