Open robinsmidsrod opened 4 days ago
I am experiencing the same issue.
Controlling the alarm from HA is still working but the alarm state doesn't reflect the changes and it doesn't matter how the alarm is changed (pad, app or HA).
Same issue here, arose when upgrading to HA Core 2024.11.
seems related to this? https://github.com/gjohansson-ST/sector/issues/217
Same issue here.
Think I have a fix her, but kinda blind coding https://github.com/gjohansson-ST/sector/pull/224
Hi guys
There should be more logs here trying to tell what's going on. We won't be able to fix it here as we're rewriting the integration and therefore can't patch the version you're using. But we could try to figure it out and you can always fix locally if needed.
There's not reason for the new enum to cause this error, it's just a deprecation notice for now.
Anyone can turn on debug logs for sector
and see if you get something more?
Anyone can turn on debug logs for
sector
and see if you get something more?
In configuration.yaml:
logger:
default: warning
logs:
custom_components.sector: debug
Not getting much, only the deprecation warnings, and
Logger: homeassistant.components.binary_sensor Kilde: helpers/entity_platform.py:764 integrasjon: Binær sensor (dokumentasjon, problemer) Førs oppstått: 21:55:50 (1 hendelser) Sist logget: 21:55:50
Platform sector does not generate unique IDs. ID sa_bs_01241417_None already exists - ignoring binary_sensor.online_2
Also a timeout: Timeout during fetching https://mypagesapi.sectoralarm.net/api/Panel/GetPanelStatus?panelId=xxx with data None
So hopefully like said before you can fix the incorrect file youself.
Open custom_components/sector/alarm_control_panel.py
Scroll to the bottom of the file and add the follow
@property
def state(self) -> str:
"""Return the state."""
return self._attr_state
In the bottom of the file it should then look like:
@property
def available(self) -> bool:
"""Return entity available."""
return True
@property
def state(self) -> str:
"""Return the state."""
return self._attr_state
Dont forget the indentations so it's correct!
That did the trick! Thanks
It worked for me as well. I tried to turn on the alarm (home mode) from HA, and it changed state, and then I turned off the alarm from the wall panel, and (eventually) the state in HA switched to disarmed.
So this looks like an acceptable fix.
Will this be in a new release soon, or is this just a band-aid that is not the correct way to do things?
Will this be in a new release soon, or is this just a band-aid that is not the correct way to do things?
As mentioned above there are new enums and state handling in the alarm entity which will replace this quick fix. On the other hand it requires HA 2024.11 but I think it's worth it anyhow so anyone wanting the new version eventually needs to be on that level.
@gjohansson-ST did they add new enums and deprecate the old in the same release? thats kinda eager?
They is me in this case as I made the PR for the new enums and deprecation 🤣
Actually it's supposed to be deprecated meaning it should still work but there is a flaw I noticed which broke sector
. I need to fix that in HA.
that trick doesn't work for me... I had an error loading.
/homeassistant/custom_components/sector/alarm_control_panel.py
@property def available(self) -> bool: """Return entity available.""" return True
@property
def state(self) -> str:
"""Return the state."""
return self._attr_state
No idea why that wouldn't work for you so I can only assume you have some typing error in the file. Anyway I have now made a bugfix to sort this issue, so hopefully it's there shortly so it will be part of 2024.11.2
No idea why that wouldn't work for you so I can only assume you have some typing error in the file. Anyway I have now made a bugfix to sort this issue, so hopefully it's there shortly so it will be part of 2024.11.2
Finally it work! I had to restart it a couple of times until it worked. the mysteries of programming 🤷. Thanks for the trick 😉!
Describe the bug
The alarm panel status is always unknown, not the armed/disarmed state I expect. I've tried to turn off the integration for some hours to see if it was a rate-limit. It doesn't seem to be. I've also tried logging into the website, and everything works there.
Version
v0.4.3
Expected behavior
The alarm panel status in HA should be armed/disarmed whenever it's changed by the provider.
Additional context
I'm getting this information in the logs: