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

Target temperature is not synchronized with Tado X devices #1373

Closed amroncz closed 2 weeks ago

amroncz commented 3 months ago

Prerequisites

Model name of your Devices: Tado X

Output from Home Assistant Developer Tools state e.g.:

hvac_modes:
  - "off"
  - heat
min_temp: 5
max_temp: 30
current_temperature: 24.8
temperature: 20
friendly_name: Heizkörperthermostat Badezimmer
supported_features: 385

Output from Home Assistant Device Diagnostic from BT:

config_entry-better_thermostat-01J3HWHAEHRWJZNCY4FPQWVF2G.json

Description

The target temperature of the virtual BT device is not synchronized with the real Tado X devices. Accordingly, heating does not take place.

Output from the virtual BT device (temperature 30):

hvac_modes: heat, off
min_temp: 5
max_temp: 30
preset_modes: none
supported_features: 401
friendly_name: Klima Badezimmer
target_temp_step: null
current_temperature: 25.4
temperature: 30
hvac_action: off
preset_mode: none
window_open: false
call_for_heat: false
last_change: 2024-07-24T09:15:13.567292
humidity: 67.3
main_mode: off
tolerance: 0
heating_power: 0.01
errors: []
batteries: {}

Output from the real Tado X device (temperature 30):

see above

Steps to Reproduce

You have to create a helper of the template entity type if you do not have an external temperature sensor, because the temperature of the Tado X device does not provide its own sensor via the Matter integration, but is an attribute (current_temperature) of the climate entity (basically the same as what comes out of BT at the end).

Example: {{ state_attr('climate.radiator_thermostat_bathroom', 'current_temperature') }}

All other steps are the normal setup steps from the BT documentation.

In addition, you must set the temperature of the virtual BT device, either in the Home Assistant developer tools or in the UI, for example with the BT Thermostat Card (the card is not the problem here!).

Expected behavior:

The target temperature of the virtual BT device should be passed to the real Tado X devices so that heating is possible.

In my case, the temperature of my Tado X device must be set from the current 20 degrees to the 30 degrees set in the virtual BT device.

Actual behavior:

The target temperature of the virtual BT device is not passed to the real Tado X devices. It is therefore not possible to heat.

Versions

Home Assistant: Core 2024.7.3 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0

BT: 1.6.0

Additional Information

none

tasomaniac commented 2 weeks ago

I just purchased a Tado X device and I'm observing similar behavior. In addition to this, I have another weird problem to report.

Video of the weird behavior

https://github.com/user-attachments/assets/c4532b11-8079-42a7-934d-8e15a61df8d9

Last 5 lines of the log: Here I was changing the temperature via Tado app. Then BT is setting it back again.

2024-10-31 15:56:41.202 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: trigger_trv_change test / _old_heating_setpoint: 19.5 - _new_heating_setpoint: 18.5 - _last_temperature: 19.5
2024-10-31 15:56:41.203 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: TRV climate.bedroom_tado_thermostat decoded TRV target temp changed from 18.0 to 18.5
2024-10-31 15:56:41.212 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.bedroom_tado_thermostat - new setpoint calibration: 20.0 | external_temp: 20.7, target_temp: 18.5, trv_temp: 22.3
2024-10-31 15:56:41.216 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_temperature: climate.bedroom_tado_thermostat from: 19.5 to: 20.0
2024-10-31 15:56:41.324 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: climate.bedroom_tado_thermostat / check_target_temp / _last: 20.0 - _current: 18.5

Debug full logs (here you can see that BT is setting it back)

2024-10-31 15:49:59.181 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: startup completed.
2024-10-31 15:51:02.384 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.smart_radiator_thermostat_e1 - new setpoint calibration: 19.0 | external_temp: 20.7, target_temp: 20.0, trv_temp: 19.9
2024-10-31 15:51:02.385 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: control_trv: window is closed, setting window closed restoring mode: off
2024-10-31 15:52:16.683 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] better_thermostat : found device:
2024-10-31 15:52:16.684 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] DeviceEntry(area_id='bedroom', config_entries={'01J9RFZ9ZCZ6FRFJ01MD1KF3CZ', '01JBHBMMNJWCNDKD94PRX426N3'}, configuration_url=None, connections=set(), created_at=datetime.datetime(2024, 10, 31, 13, 9, 18, 118227, tzinfo=datetime.timezone.utc), disabled_by=None, entry_type=None, hw_version='VA04', id='dead7e2a065742cad2ee1d10f17bc154', identifiers={('matter', 'deviceid_2C71D1B20A08CBDE-0000000000000002-MatterNodeDevice')}, labels=set(), manufacturer='tado° GmbH', model='Smart Radiator Thermostat X', model_id='1', modified_at=datetime.datetime(2024, 10, 31, 13, 18, 34, 681394, tzinfo=datetime.timezone.utc), name_by_user='Bedroom Tado', name='Smart Radiator Thermostat X', primary_config_entry='01J9RFZ9ZCZ6FRFJ01MD1KF3CZ', serial_number=None, suggested_area=None, sw_version='1.0', via_device_id=None, is_new=False)
2024-10-31 15:52:16.705 INFO (MainThread) [custom_components.better_thermostat.adapters.delegate] better_thermostat : integration: matter isn't native supported, feel free to open an issue, fallback adapter generic
2024-10-31 15:52:16.706 DEBUG (MainThread) [custom_components.better_thermostat.utils.helpers] better thermostat: Could not find local calibration entity for climate.bedroom_tado_thermostat
2024-10-31 15:52:29.389 DEBUG (MainThread) [custom_components.better_thermostat.config_flow] Confirm: [{'trv': 'climate.bedroom_tado_thermostat', 'integration': 'matter', 'model': 'Smart Radiator Thermostat X', 'adapter': None, 'advanced': {'calibration': 'target_temp_based', 'calibration_mode': 'heating_power_calibration', 'protect_overheating': False, 'no_off_system_mode': False, 'heat_auto_swapped': False, 'child_lock': False, 'homaticip': False}}]
2024-10-31 15:52:29.443 INFO (MainThread) [custom_components.better_thermostat.adapters.delegate] better_thermostat None: integration: matter isn't native supported, feel free to open an issue, fallback adapter generic
2024-10-31 15:52:29.467 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: Waiting for entity to be ready...
2024-10-31 15:52:29.481 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: Starting version 1.6.0. Waiting for entity to be ready...
2024-10-31 15:52:29.482 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: Startup config, BT hvac mode is heat, Target temp 14.5
2024-10-31 15:52:29.492 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.bedroom_tado_thermostat - new setpoint calibration: 16.0 | external_temp: 20.7, target_temp: 14.5, trv_temp: 22.3
2024-10-31 15:52:29.493 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_temperature: climate.bedroom_tado_thermostat from: 5.0 to: 16.0
2024-10-31 15:52:31.207 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: climate.bedroom_tado_thermostat / check_target_temp / _last: 16.0 - _current: 16.0
2024-10-31 15:52:34.204 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: get last avg outdoor temps...
2024-10-31 15:52:39.226 INFO (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: startup completed.
2024-10-31 15:52:42.398 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: trigger_trv_change test / _old_heating_setpoint: 16.0 - _new_heating_setpoint: 17.0 - _last_temperature: 16.0
2024-10-31 15:52:42.399 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: TRV climate.bedroom_tado_thermostat decoded TRV target temp changed from 14.5 to 17.0
2024-10-31 15:52:42.411 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.bedroom_tado_thermostat - new setpoint calibration: 18.5 | external_temp: 20.7, target_temp: 17.0, trv_temp: 22.3
2024-10-31 15:52:42.412 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_temperature: climate.bedroom_tado_thermostat from: 16.0 to: 18.5
2024-10-31 15:52:44.367 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: climate.bedroom_tado_thermostat / check_target_temp / _last: 18.5 - _current: 17.0
2024-10-31 15:52:52.526 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.bedroom_tado_thermostat - new setpoint calibration: 18.5 | external_temp: 20.7, target_temp: 17.0, trv_temp: 22.3
2024-10-31 15:52:52.534 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_hvac_mode: climate.bedroom_tado_thermostat from: heat to: off
2024-10-31 15:52:52.535 DEBUG (MainThread) [custom_components.better_thermostat.adapters.generic] better_thermostat None: set_hvac_mode off
2024-10-31 15:52:59.032 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: HA set target temperature to 17.8 & None
2024-10-31 15:52:59.051 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.bedroom_tado_thermostat - new setpoint calibration: 19.5 | external_temp: 20.7, target_temp: 17.8, trv_temp: 22.3
2024-10-31 15:55:49.983 DEBUG (MainThread) [custom_components.better_thermostat.climate] better_thermostat Bedroom Thermostat: HA set target temperature to 18.0 & None
2024-10-31 15:55:50.000 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.bedroom_tado_thermostat - new setpoint calibration: 19.5 | external_temp: 20.7, target_temp: 18.0, trv_temp: 22.3
2024-10-31 15:55:50.001 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_hvac_mode: climate.bedroom_tado_thermostat from: heat to: off
2024-10-31 15:55:50.001 DEBUG (MainThread) [custom_components.better_thermostat.adapters.generic] better_thermostat None: set_hvac_mode off
2024-10-31 15:55:54.217 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.bedroom_tado_thermostat - new setpoint calibration: 19.5 | external_temp: 20.7, target_temp: 18.0, trv_temp: 22.3
2024-10-31 15:55:54.218 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_hvac_mode: climate.bedroom_tado_thermostat from: off to: heat
2024-10-31 15:55:54.218 DEBUG (MainThread) [custom_components.better_thermostat.adapters.generic] better_thermostat None: set_hvac_mode heat
2024-10-31 15:55:57.044 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_temperature: climate.bedroom_tado_thermostat from: 18.5 to: 19.5
2024-10-31 15:55:57.232 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: climate.bedroom_tado_thermostat / check_target_temp / _last: 19.5 - _current: 18.5
2024-10-31 15:56:14.221 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: TRV climate.smart_radiator_thermostat_e1 sends new internal temperature from 19.9 to 19.7
2024-10-31 15:56:14.222 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: trigger_trv_change test / _old_heating_setpoint: 17.5 - _new_heating_setpoint: 17.5 - _last_temperature: 17.5
2024-10-31 15:56:14.225 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.smart_radiator_thermostat_e1 - new setpoint calibration: 19.0 | external_temp: 20.7, target_temp: 20.0, trv_temp: 19.7
2024-10-31 15:56:41.202 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: trigger_trv_change test / _old_heating_setpoint: 19.5 - _new_heating_setpoint: 18.5 - _last_temperature: 19.5
2024-10-31 15:56:41.203 DEBUG (MainThread) [custom_components.better_thermostat.events.trv] better_thermostat None: TRV climate.bedroom_tado_thermostat decoded TRV target temp changed from 18.0 to 18.5
2024-10-31 15:56:41.212 DEBUG (MainThread) [custom_components.better_thermostat.calibration] better_thermostat None: climate.bedroom_tado_thermostat - new setpoint calibration: 20.0 | external_temp: 20.7, target_temp: 18.5, trv_temp: 22.3
2024-10-31 15:56:41.216 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: TO TRV set_temperature: climate.bedroom_tado_thermostat from: 19.5 to: 20.0
2024-10-31 15:56:41.324 DEBUG (MainThread) [custom_components.better_thermostat.utils.controlling] better_thermostat None: climate.bedroom_tado_thermostat / check_target_temp / _last: 20.0 - _current: 18.5

Also diagnostics attached config_entry-better_thermostat-01JBHH0KAE0879B9CP163R0RCF.json

tasomaniac commented 2 weeks ago

Perhaps ignore my comment above. I did not know the behavior of Better Thermostat. It actually sets the real thermostat to such degrees automatically. So this is actually expected behavior.

KartoffelToby commented 2 weeks ago

So i think this issue can be closed, feel free to reopen it if i'm wrong