-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix alarm states after update to HA 2024.11.0 #31
base: main
Are you sure you want to change the base?
Conversation
Replaced deprecated parts of the code
@Pigotka, may I ask what the status is? |
@karelkryda WAiting for you to answer PR question. |
@Pigotka where exactly is the question? |
@karelkryda can you answer so we can move on with it? |
@Pigotka, As I wrote 3 days ago, I don't see any question asked anywhere. Thank you in advance |
Very strange I mentioned you there and I can see them a few messages above here. Never mind my concerns is about backward compatibility of the integration. You started using alarm_state and I need to know from what HA version this property exists and limit the min required version. |
Strange, they must have gotten lost somewhere on the way. Hopefully it's okay this way. |
Btw it looks like they fix the |
Can confirm, it started working again after updating HA to 2024.11.2 and there was additional fix for Homekit bridge to deal with alarm devices with state Uknown. I was looking at the docs and everything and they documented it as backwards compatible until 2025.11, but removed the backwards compatibility immediately. So to answer the question above, this fix requires 2024.11 and newer, but the current version of this integration without this fix is now, yet again, working until 2025.11. |
@jirihelmich thank you so much for explaining. I looked into all this and indeed they made such a strange decision. Now the alarm entity has both state and alarm_state and I'm not sure what was the motivation to this. I guess there is a possibility of typing the state using Enum now. Do you agree? |
They simply said they would make this backwards compatible, but they forgot to actually do it. Now that they fixed that, I’d agree, I’d either wait for this fix to be released, or, it would have to be redone to be backwards compatible as well. |
Hi @Pigotka, @karelkryda, @jirihelmich, the integration doesn't work since yesterday HASS Core Update. Shall I open an issue? |
Hi @DaRockwilder187, What problems are you facing? |
Hi @karelkryda, here is the debug log after a reload of the integration: I also tried to deaktivate and configure the connection new, but this doesn't work either. Can you see something from this log? |
I see nothing special in the log you provided, also didn't find anything in the release notes for the new 2025 release. I would try to reinstall the integration and then open issue if it persist 🤷🏻♂️. |
hmm thats strange. I reinstalled, but doesn't work. I'm doing a restore to yesterdays backup, maybe this will help. Thanks and BR |
@karelkryda and @Pigotka After the change as suggested in #34 it works again. Thanks for having a look though! |
Yeah I see, btw this is a change I did in this PR too, so :D |
As I described in #30, hassio apparently made a breaking change and this integration stopped reporting alarm entity states correctly. This PR fixes setting entity states, including changing deprecated parts of the code to the current one.
Changes made:
_attr_state
to_attr_alarm_state
STATE_ALARM_*
constants toAlarmControlPanelState
UnitOfTemperature
StrEnum
with current oneFixes #30