Skip to content
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

Failsafe don't work when sensor not available / output_safety & sensor_stall #220

Open
gryzli133 opened this issue May 28, 2024 · 1 comment

Comments

@gryzli133
Copy link

Describe the bug
When a temperature sensor is working and later loose the connection (sensor_stall), then safety value will be set to output (output_safety). But when the sensor is not available since HA startup, then sensor_stall is not working.

To Reproduce
Steps to reproduce the behavior:

  1. Start HA with a temp sensor unavailable
  2. Wait sensor_stall (as set in config - 10 min in my setup)
  3. Nothing happens

Expected behavior
I would expect, that when sensor is unavailable from beginning, or lately after sensor_stall time, the output will be set to output_safety

Screenshots

Desktop (please complete the following information):

  • OS: Win 11
  • Browser: chrome
  • Version [e.g. 22]
@ScratMan
Copy link
Owner

ScratMan commented Jun 1, 2024

Hello, that's a really strange bug, as the safety feature is based on an internal variable called _last_sensor_update. This variable is initialized at the init of the thermostat (during HA boot), and then is refreshed only if the sensor returns a new valid value (a float). So if your sensor is down, it should never refresh and the safety should.

I'd rather think the thermostat should not start. Could you please enable the debug logs by adding the following lines in your HA configuration.yaml ?

logger:
  logs:
    custom_components.smart_thermostat: debug

Please check if you see this line at the thermostat startup:
<thermostat entity ID>: Unable to update from sensor <sensor entity id>
or if you have this one:
<thermostat entity ID>: Received new temperature
or this one:
<thermostat entity ID>: Obtained temperature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants