KartoffelToby / better_thermostat

This custom component for Home Assistant will add crucial features to your climate-controlling TRV (Thermostatic Radiator Valves) to save you the work of creating automations to make it smart. It combines a room-temperature sensor, window/door sensors, weather forecasts, or an ambient temperature probe to decide when it should call for heat and automatically calibrate your TRVs to fix the imprecise measurements taken in the radiator's vicinity.
https://better-thermostat.org
GNU Affero General Public License v3.0
847 stars 128 forks source link

Bypass Weather Sensor if Unavailable #1388

Open jamesonuk opened 2 months ago

jamesonuk commented 2 months ago

What is the feature?

Allow BT to ignore a missing weather sensor

Description

Currently if your weather sensor goes offline (Accuweather only allows 50 API calls a day and sometimes if you restart HA several times you can blow this limit and end up with a Weather sensor with a state of None).

If this happens then BT does not initialise and the logs just contain

2024-09-10 10:36:13.841 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Playroom Thermostat: Starting version 1.6.0. Waiting for entity to be ready...
2024-09-10 10:36:13.841 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Playroom Thermostat: waiting for weather entity with id 'weather.home' to become fully available...
2024-09-10 10:36:13.841 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: Starting version 1.6.0. Waiting for entity to be ready...
2024-09-10 10:36:13.841 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: waiting for weather entity with id 'weather.home' to become fully available...

Whilst the weather is a nice to have I think BT should not stop if it cannot get weather sensor

Additional Information

Similar to https://github.com/KartoffelToby/better_thermostat/issues/1383 but more specific

cl445 commented 1 month ago

Same here: the batteries in my weather sensor ran out, and the BT stopped working—despite having configured a weather service as a fallback that could have been used.