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
715 stars 124 forks source link

Problem with Sonoff Temp Sensor for Outdoor Temp #1045

Open TheGnome0815 opened 11 months ago

TheGnome0815 commented 11 months ago

Hi again,

I have a new Problem with the Better Thermostat Integration. I have a Sonoff Temp Sensor for the Outdoor Temperature. When I use this in Better Thermostat, the Thermostats don't change to the off Status when the Temperature, I have written in the Script for 17°C, is exceeded. Whenn I use the Weather entity (open weather map) it works fine. When I used the Outdoor Sensor it doesn´t work. Can you help please. The Diagnosis is attached. { "home_assistant": { "installation_type": "Home Assistant OS", "version": "2023.8.1", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.11.4", "docker": true, "arch": "x86_64", "timezone": "Europe/Berlin", "os_name": "Linux", "os_version": "6.1.39", "supervisor": "2023.07.1", "host_os": "Home Assistant OS 10.4", "docker_version": "23.0.6", "chassis": "embedded", "run_as_root": true }, "custom_components": { "midea_ac": { "version": "0.2.3", "requirements": [ "msmart==0.2.3", "pycryptodome", "pycryptodomex", "click" ] }, "waste_collection_schedule": { "version": "1.40.0", "requirements": [ "icalendar", "recurring_ical_events", "icalevents", "bs4" ] }, "alexa_media": { "version": "4.6.5", "requirements": [ "alexapy==1.26.8", "packaging>=20.3", "wrapt>=1.12.1" ] }, "climate_group": { "version": "0.4.2", "requirements": [] }, "hacs": { "version": "1.32.1", "requirements": [ "aiogithubapi>=22.10.1" ] }, "icloud3": { "version": "2.4.7", "requirements": [] }, "espsomfy_rts": { "version": "2.1.0", "requirements": [ "websocket-client==1.4.2" ] }, "skyq": { "version": "v2.11.5", "requirements": [ "pyskyqremote==0.3.25" ] }, "better_thermostat": { "version": "1.2.2", "requirements": [] } }, "integration_manifest": { "domain": "better_thermostat", "name": "Better Thermostat", "after_dependencies": [ "climate" ], "codeowners": [ "@kartoffeltoby" ], "config_flow": true, "dependencies": [ "climate", "recorder" ], "documentation": "https://github.com/KartoffelToby/better_thermostat", "iot_class": "local_push", "issue_tracker": "https://github.com/KartoffelToby/better_thermostat/issues", "requirements": [], "version": "1.2.2", "is_built_in": false }, "data": { "info": { "name": "Hobbyraum", "temperature_sensor": "sensor.taster_oma_temperatur", "off_temperature": 17, "humidity_sensor": "sensor.taster_oma_luftfeuchtigkeit", "weather": null, "window_sensors": null, "outdoor_sensor": "sensor.temp_sensor_ausen_auffahrt_temperature", "window_off_delay": 0, "model": "FRITZ!DECT 301/FRITZ!DECT 301" }, "thermostat": { "climate.hkr_oma_stube_erker": { "name": "HKR Oma Stube Erker", "state": "heat", "attributes": { "hvac_modes": [ "heat", "off" ], "min_temp": 8.0, "max_temp": 28.0, "preset_modes": [ "eco", "comfort" ], "current_temperature": 21.5, "temperature": 8.0, "preset_mode": null, "battery_low": false, "battery_level": 70, "holiday_mode": false, "summer_mode": false, "window_open": false, "friendly_name": "HKR Oma Stube Erker", "supported_features": 17 }, "bt_config": { "calibration": "target_temp_based", "calibration_mode": "heating_power_calibration", "protect_overheating": true, "no_off_system_mode": false, "heat_auto_swapped": false, "child_lock": false, "homaticip": false }, "bt_adapter": "fritzbox", "bt_integration": "fritzbox", "model": "FRITZ!DECT 301" }, "climate.hkr_oma_stube_velux": { "name": "HKR Oma Stube Velux", "state": "heat", "attributes": { "hvac_modes": [ "heat", "off" ], "min_temp": 8.0, "max_temp": 28.0, "preset_modes": [ "eco", "comfort" ], "current_temperature": 20.0, "temperature": 8.0, "preset_mode": null, "battery_low": false, "battery_level": 70, "holiday_mode": false, "summer_mode": false, "window_open": false, "friendly_name": "HKR Oma Stube Velux", "supported_features": 17 }, "bt_config": { "calibration": "target_temp_based", "calibration_mode": "heating_power_calibration", "protect_overheating": true, "no_off_system_mode": false, "heat_auto_swapped": false, "child_lock": false, "homaticip": false }, "bt_adapter": "fritzbox", "bt_integration": "fritzbox", "model": "FRITZ!DECT 301" } }, "external_temperature_sensor": { "entity_id": "sensor.taster_oma_temperatur", "state": "22.0", "attributes": { "state_class": "measurement", "unit_of_measurement": "\u00b0C", "device_class": "temperature", "friendly_name": "Taster Oma Temperatur" }, "last_changed": "2023-08-05T11:43:54.303134+00:00", "last_updated": "2023-08-05T11:43:54.303134+00:00", "context": { "id": "01H72R5PDZKBW7EQ1SVTRH11BV", "parent_id": null, "user_id": null } }, "window_sensor": "-" } } config_entry-better_thermostat-c1bc60a50ee9074e03678998da9f60db.json.txt

TheGnome0815 commented 11 months ago

By the way, I used Fritz Dect 301 Thermostat

KartoffelToby commented 11 months ago

At this time btw uses the avg of the last 3 days at 5am every day, i suggest that you need the value much higher

TheGnome0815 commented 11 months ago

I‘m not sure if I understood you correctly. The off temperature is only queried once in the morning at 5 a.m. and there is an average value of 3 days. The thermostat does not switch off if the temperature is exceeded during the day. is that correct? If so, that's not nice. We often have temperature changes of 10 to 15 degrees here.

TheGnome0815 commented 11 months ago

I thought about it again and I think I got it. For example, if I set a temperature of 14 degrees and it has fallen below this for three days in a row, the heating goes into winter mode and starts heating. if the temperature is exceeded in sequence, the heater goes into summer mode and switches off. Did I understand that correctly?

But back to the original problem with the Sonoff sensor. It seems that the values ​​of the sensor cannot be read. The sensors have no effect at all. On the contrary, it seems as if the regulation no longer works. The BT Card in the frontend is greyed out. I've already fixed the problem myself by making a template sensor. It seems it works fine with BT

By the way, the Zigbee sensor is connected and delivers data.

wurzentom commented 11 months ago

If I understand correctly, it works like this: BT evaluates the weather entity every day at 5 a.m. and if the set temperature is exceeded, BT goes into summer mode.

Then what is the outside sensor for? I thought BT evaluates the outside sensor and switches the thermostat off when the temperature is exceeded and on again when it falls below, e.g. above 18 degrees off, below 17.5 degrees on (hysteresis, otherwise the controller jumps at the set temperature) Similar to the window contact. This function is useful in the transitional period when it is still cold in the morning, the temperature rises at midday and it gets cold again in the evening