core: Withings in_bed sensor state set to unavailable after a HA restart
The problem
I just started noticing that when HA is restarted, that my in_bed sensors become marked as unavailable. The will not change to on or off again, until I actually get into/out of bed. Once they have been activated,they are good until the next restart. I have a few automations that require the sensors to be either on or off depending on the automation, and they fail as they are.
Environment
arch | x86_64 |
---|---|
dev | false |
docker | false |
hassio | false |
installation_type | Home Assistant Core |
os_name | Linux |
os_version | 4.18.0-25-generic |
python_version | 3.7.3 |
timezone | America/New_York |
version | 0.114.2 |
virtualenv | true |
- Home Assistant Core release with the issue: 114.2
- Last working Home Assistant Core release (if known): 112 for sure, I believe 113 as well
- Operating environment (OS/Container/Supervised/Core):
- Integration causing this issue: withings
- Link to integration documentation on our website: https://www.home-assistant.io/integrations/withings/
Problem-relevant configuration.yaml
N/A
Additional information
Super easy to reproduce if you have the sensor. Verify the state is on or off. Restart HA. Wait until HA is fully started, the state of the sensor will be “unavailable”, it will stay in that state until the sensor is activated again.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 30 (3 by maintainers)
@vangorra Are these fixes available somewhere?
Well I think we can all agree to never buy anything from Withings again LOL
I’m just getting this now;
It actually came in for 10 mins this morning, but I had a notification to reconfigure the integration. After doing that, it disappeared again.
😦
I’ve worked around this by using an automation to set input Booleans to true or false when someone enters or leaves the bed. Then I base everything off the state of the input Booleans instead of directly off the sensors.
The input Boolean will retain there current value through a restart and then will get updated the next time the mat sends an update. You still run the risk of a mat state change during a restart, but I find for my situation it is very small risk.
With how the API works, I don’t know if this is the best fit product for tracking bed presence. I’ve come across other projects using inexpensive pressure mats and open/close z-wave sensors that might be more reliable.