core icon indicating copy to clipboard operation
core copied to clipboard

Schlage cant rename entities after core update 2024.10.0

Open alexandrezia opened this issue 1 year ago • 11 comments

The problem

I have renamed my schalage lock and have it referenced in many automations, node-red, etc. After update fo HA core 2024.10.0 schlage is auto-renaming the entities to default names and breaking all my integrations and dashboards. example: I have my front door lock named and referenced as: lock.front_door_lock now it renamed to: lock.front_door and when I rename it back to lock.front_door_lock it automatically rename back to lock.front_door

this is breaking all my stuff and I want it to have the names I choose them to have ....

What version of Home Assistant Core has the issue?

core-2024.10.0

What was the last working version of Home Assistant Core?

core-2024.9.2

What type of installation are you running?

Home Assistant Supervised

Integration causing the issue

Schlage

Link to integration documentation on our website

No response

Diagnostics information

I have my schlage entities for one year, and all working and stable. Now with the new ha core , it's always registering my shclage entities as if they where new entities, and naming them with default names And this is preventing me to rename tham back to my old and desired names

Example YAML snippet

No response

Anything in the logs that might be useful for us?

- it is always Registering new entities (even if I have them for one year already) :

2024-10-03 10:59:12.601 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.schlage entity: binary_sensor.front_door_keypad_disabled
2024-10-03 10:59:12.609 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new lock.schlage entity: lock.front_door
2024-10-03 10:59:12.610 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.schlage entity: sensor.front_door_battery
2024-10-03 10:59:12.611 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.schlage entity: switch.front_door_keypress_beep
2024-10-03 10:59:12.612 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.schlage entity: switch.front_door_1_touch_locking

- when I try to rename it back to `lock.front_door_lock`: 

2024-10-03 10:59:27.297 WARNING (Recorder) [homeassistant.components.recorder.entity_registry] Cannot migrate history for entity_id `lock.front_door` to `lock.front_door_lock` because the new entity_id is already in use

Additional information

No response

alexandrezia avatar Oct 03 '24 15:10 alexandrezia

I also have these Registered new entities logs every 30 seconds in Ha logs, it's flooding my logs ...

2024-10-03 10:59:12.601 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.schlage entity: binary_sensor.front_door_keypad_disabled
2024-10-03 10:59:12.609 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new lock.schlage entity: lock.front_door
2024-10-03 10:59:12.610 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.schlage entity: sensor.front_door_battery
2024-10-03 10:59:12.611 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.schlage entity: switch.front_door_keypress_beep
2024-10-03 10:59:12.612 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.schlage entity: switch.front_door_1_touch_locking

alexandrezia avatar Oct 03 '24 15:10 alexandrezia

Hey there @dknowles2, mind taking a look at this issue as it has been labeled with an integration (schlage) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of schlage can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign schlage Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


schlage documentation schlage source (message by IssueLinks)

home-assistant[bot] avatar Oct 03 '24 17:10 home-assistant[bot]

Having the exact same issue where “_lock” was removed from the name and now automations are broke.

Attempted to rename entity and I get this in log:

Cannot migrate history for entity_id `lock.garage_service_door` to `lock.garage_service_door_lock` because the new entity_id is already in use
Cannot migrate history for entity_id `lock.front_door` to `lock.front_door_lock` because the new entity_id is already in use

Mclovin88 avatar Oct 04 '24 04:10 Mclovin88

That's strange. The auto-addition/removal should be keying off of device id which is supposed to be unique. I took a quick second look and it seems correct. I won't have time to look at this for a while, so for now I'd suggest downgrading to the previous HA version.

dknowles2 avatar Oct 04 '24 15:10 dknowles2

That's unfortunate, But your suggestion is not acceptable, I won't downgrade HA core version because an integration is not working as expected. I'd rather disable schlage integration instead ...

alexandrezia avatar Oct 04 '24 16:10 alexandrezia

For me I only have two automations using this so I just updated my automations to use the new shortened name (that I can’t edit) and it’s able to work that way.

I won’t be going back in versions either so for now this just stays unresolved.

Mclovin88 avatar Oct 04 '24 17:10 Mclovin88

I've found a workaround that did not require rename references in automations:

  • Rename the locker in the Schlage app (in your phone) to the desired name you want in HA, then the integration will force the right name in HA

  • however the log flooding still persists, logging the discovery every 30 seconds

alexandrezia avatar Oct 04 '24 18:10 alexandrezia

I also found that it makes the 1-touch lock and keypad beep switches always visible and/or enabled. I can’t hide these entities or disable them, they come back within seconds

jtscott avatar Oct 05 '24 00:10 jtscott

Yep. Same issues here.

JonLaliberte avatar Oct 05 '24 05:10 JonLaliberte

Related? https://github.com/home-assistant/core/issues/115747 https://github.com/home-assistant/core/issues/125730

JonLaliberte avatar Oct 05 '24 05:10 JonLaliberte

I found the bug. PR has been sent for review.

dknowles2 avatar Oct 05 '24 23:10 dknowles2