-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Bug: Local sensor stops updating when HA was restarted #136
Comments
Hey @Draghmar, That's because its state doesn't change so hass.agent doesn't publish it. The underlying system is scheduled to be improved, but until then you can create a PublishAllSensors command to force resending all states. If you set it to trigger after a HA restart, you should be ok for now. |
Oh, ok. I thought HASS.Agent has some persistent connection and knows immediately that HA is gone. alias: Force HASS.Agent sensors update after HA restarts
id: 272d3766-7ef6-4150-a16c-17dfebd682be
trigger:
- platform: homeassistant
event: start
action:
- service: button.press
target:
entity_id: button.earth_publishallsensors Where |
It actually does know that, and it should already resend the values, but it's unreliable at the moment as you noticed heh. Yep exactly, maybe add a delay to make sure everything has started: - delay:
minutes: 2 But that might not be necessary, needs testing. |
No problem, I can live with that, knowing now what to look at. ;) I will leave it without delaying for now and see if that works - as far I know |
I noticed the same issue with Satellite service sensors. Probably the same problem as with local sensors |
i think i have this issue with the satellite service. however it doesnt seem consistent. I dont think its an issue that its not updating the last value as its not changed (so still unknown). I think it just gets disconnected (or doesnt connect). What's the configured retry to connect to mqtt if the device is offline / or just cant connect? |
I've merged all tickets related to this issue into a central pinned one: [#204] Closing this one to keep it in one place. |
Describe the bug
I'm using local sensor to track the state of the PC: LastSystemStateChange. I've noticed that when HA restarts for some reason (on update for example), that sensor becomes
unknown
and doesn't come back unless I click buttonstore and activate sensors
, which probably forces update at that moment. It looks like lost connection sets theunknown
state but after HA gets back online, there is no sync of states happening.To Reproduce
Steps to reproduce the behavior:
Expected behavior
HASS.Agent should know if the connection to the HA was lost and after getting it back online it should update the sensors to make sure they are in sync.
Misc info (please complete the following information):
Please check what's applicable (multiple answers possible):
Additional context
Add any other context about the problem here.
Logs
There are nothing important in the logs regarding this issue:
The text was updated successfully, but these errors were encountered: