jmcollin78 / versatile_thermostat

A full featured Thermostat for Home Assistant: presets, window, motion, presence and overpowering management
MIT License
327 stars 34 forks source link

errors on new HA beta #508

Closed tbrasser closed 1 month ago

tbrasser commented 1 month ago

Logger: homeassistant.core Bron: core.py:2781 Eerst voorgekomen: 17:03:58 (25 gebeurtenissen) Laatst gelogd: 18:07:53

Error executing service: <ServiceCall climate.set_temperature (c:01J8T3SZ09TWNKCWKY6S4CV274): entity_id=['climate.trv_keuken'], temperature=19.2, target_temp_high=25.0, target_temp_low=15.0> Error executing service: <ServiceCall climate.set_temperature (c:01J8T3SZ0B2B9QGKH93B2NG70J): entity_id=['climate.trv_keuken'], temperature=19.2, target_temp_high=25.0, target_temp_low=15.0> Error executing service: <ServiceCall climate.set_temperature (c:01J8T3SZ0C2BF9YRWY56BG62QS): entity_id=['climate.trv_badkamer'], temperature=14.0, target_temp_high=25.0, target_temp_low=15.0> Error executing service: <ServiceCall climate.set_temperature (c:01J8T3T6YX6V0R7YXGWWHW5W66): entity_id=['climate.trv_eetkamer_links'], temperature=23.2, target_temp_high=25.0, target_temp_low=15.0> Error executing service: <ServiceCall climate.set_temperature (c:01J8T3T6Z14E6JKF3G1NQ7V0PA): entity_id=['climate.trv_eetkamer_rechts'], temperature=23.6, target_temp_high=25.0, target_temp_low=15.0> Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/core.py", line 2781, in _run_service_call_catch_exceptions await coro_or_task File "/usr/src/homeassistant/homeassistant/core.py", line 2804, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 996, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1068, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/climate/init.py", line 977, in async_service_temperature_set raise ServiceValidationError( homeassistant.exceptions.ServiceValidationError: Set temperature action was used with the target temperature low/high parameter but the entity does not support it

jmcollin78 commented 1 month ago

Thank you @tbrasser for the information,

Can you please tell me the exact release name of HA you use ? Please make a report also in HA to explain the issue you face and the breaking change. Thank you !

tbrasser commented 1 month ago

Core 2024.10.0b2

will try to find the breaking change

frenck commented 1 month ago

CleanShot 2024-09-27 at 19 49 03@2x

The integration report it only support setting a target temperature, not a range.

We constantly improve error checking in Home Assistant, thus this is now surfacing.

jmcollin78 commented 1 month ago

Thank you @frenck for your report. I understand this will be included in the next release, and I will have to deal with.

@tbrasser can you explain me the configuration you use (what kinds of VTherm, what kind of underlying device) and pleas give the attributes of each (Tools / States).

tbrasser commented 1 month ago

I use vtherm over climate:

  1. climate.eetkamer:
    hvac_modes: off, auto, heat
    min_temp: 15
    max_temp: 25
    target_temp_step: 0.1
    preset_modes: none, frost, eco, comfort, boost, activity
    current_temperature: 18.3
    temperature: 19
    hvac_action: heating
    preset_mode: activity
    is_on: true
    hvac_mode: heat
    type: null
    is_controlled_by_central_mode: true
    last_central_mode: null
    frost_temp: 7
    eco_temp: 15
    boost_temp: 21
    comfort_temp: 19
    frost_away_temp: 0
    eco_away_temp: 0
    boost_away_temp: 0
    comfort_away_temp: 0
    power_temp: null
    target_temperature_step: 0.1
    ext_current_temperature: 12
    ac_mode: false
    current_power: null
    current_power_max: null
    saved_preset_mode: activity
    saved_target_temp: 19.5
    saved_hvac_mode: null
    motion_sensor_entity_id: binary_sensor.magic_areas_presence_tracking_beneden_area_state
    motion_state: on
    power_sensor_entity_id: null
    max_power_sensor_entity_id: null
    overpowering_state: null
    presence_sensor_entity_id: null
    presence_state: null
    window_state: off
    window_auto_state: off
    window_bypass_state: false
    window_sensor_entity_id: null
    window_delay_sec: null
    window_auto_enabled: false
    window_auto_open_threshold: null
    window_auto_close_threshold: null
    window_auto_max_duration: null
    window_action: window_turn_off
    security_delay_min: 60
    security_min_on_percent: 0.5
    security_default_on_percent: 0.1
    last_temperature_datetime: 2024-09-27T20:34:12.252351+02:00
    last_ext_temperature_datetime: 2024-09-27T20:34:12.252351+02:00
    security_state: false
    minimal_activation_delay_sec: 5
    device_power: 2
    mean_cycle_power: null
    total_energy: 4.81
    last_update_datetime: 2024-09-27T20:34:12.252624+02:00
    timezone: Europe/Amsterdam
    temperature_unit: °C
    is_device_active: true
    ema_temp: 18.4
    is_used_by_central_boiler: true
    is_over_climate: true
    start_hvac_action_date: 2024-09-27T20:29:27.305820+02:00
    underlying_climate_0: climate.trv_eetkamer_links
    underlying_climate_1: climate.trv_eetkamer_rechts
    underlying_climate_2: null
    underlying_climate_3: null
    is_regulated: true
    regulated_target_temperature: 20.8
    auto_regulation_mode: auto_regulation_medium
    regulation_accumulated_error: 20
    auto_fan_mode: auto_fan_none
    current_auto_fan_mode: auto_fan_none
    auto_activated_fan_mode: null
    auto_deactivated_fan_mode: null
    auto_regulation_use_device_temp: true
    icon: phu:aqara-thermo-e1
    friendly_name: Eetkamer
    supported_features: 401

    2x https://www.zigbee2mqtt.io/devices/TRVZB.html#sonoff-trvzb

    hvac_modes: off, auto, heat
    min_temp: 4
    max_temp: 35
    target_temp_step: 0.5
    current_temperature: 19.4
    temperature: 20
    hvac_action: idle
    friendly_name: TRV Eetkamer Links
    supported_features: 385
    hvac_modes: off, auto, heat
    min_temp: 4
    max_temp: 35
    target_temp_step: 0.5
    current_temperature: 19.2
    temperature: 20
    hvac_action: heating
    friendly_name: TRV Eetkamer Rechts
    supported_features: 385
  2. climate.kantoor:
    hvac_modes: off, auto, heat
    min_temp: 15
    max_temp: 25
    target_temp_step: 0.1
    preset_modes: none, frost, eco, comfort, boost, activity
    current_temperature: 19.4
    temperature: 15
    preset_mode: activity
    is_on: true
    hvac_action: null
    hvac_mode: heat
    type: null
    is_controlled_by_central_mode: true
    last_central_mode: null
    frost_temp: 7
    eco_temp: 15
    boost_temp: 21
    comfort_temp: 19
    frost_away_temp: 0
    eco_away_temp: 0
    boost_away_temp: 0
    comfort_away_temp: 0
    power_temp: null
    target_temperature_step: 0.1
    ext_current_temperature: 12
    ac_mode: false
    current_power: null
    current_power_max: null
    saved_preset_mode: activity
    saved_target_temp: 15
    saved_hvac_mode: null
    motion_sensor_entity_id: binary_sensor.magic_areas_presence_tracking_kantoor_area_state
    motion_state: off
    power_sensor_entity_id: null
    max_power_sensor_entity_id: null
    overpowering_state: null
    presence_sensor_entity_id: null
    presence_state: null
    window_state: off
    window_auto_state: off
    window_bypass_state: false
    window_sensor_entity_id: null
    window_delay_sec: null
    window_auto_enabled: false
    window_auto_open_threshold: null
    window_auto_close_threshold: null
    window_auto_max_duration: null
    window_action: window_turn_off
    security_delay_min: 60
    security_min_on_percent: 0.5
    security_default_on_percent: 0.1
    last_temperature_datetime: 2024-09-27T20:34:12.261827+02:00
    last_ext_temperature_datetime: 2024-09-27T20:34:12.261827+02:00
    security_state: false
    minimal_activation_delay_sec: 5
    device_power: 1
    mean_cycle_power: null
    total_energy: 0
    last_update_datetime: 2024-09-27T20:39:00.289667+02:00
    timezone: Europe/Amsterdam
    temperature_unit: °C
    is_device_active: true
    ema_temp: 19.33
    is_used_by_central_boiler: true
    is_over_climate: true
    start_hvac_action_date: null
    underlying_climate_0: climate.trv_kantoor
    underlying_climate_1: null
    underlying_climate_2: null
    underlying_climate_3: null
    is_regulated: true
    regulated_target_temperature: 13.4
    auto_regulation_mode: auto_regulation_medium
    regulation_accumulated_error: -20
    auto_fan_mode: auto_fan_none
    current_auto_fan_mode: auto_fan_none
    auto_activated_fan_mode: null
    auto_deactivated_fan_mode: null
    auto_regulation_use_device_temp: true
    icon: phu:aqara-thermo-e1
    friendly_name: Kantoor
    supported_features: 401

    1x https://www.zigbee2mqtt.io/devices/GS361A-H04.html#siterwell-gs361a-h04

    hvac_modes: off, auto, heat
    min_temp: 5
    max_temp: 30
    target_temp_step: 0.5
    current_temperature: 19.3
    temperature: 13
    friendly_name: TRV Kantoor
    supported_features: 385
  3. climate.badkamer:
    hvac_modes: off, heat, auto
    min_temp: 15
    max_temp: 25
    target_temp_step: 0.1
    preset_modes: none, frost, eco, comfort, boost, activity
    current_temperature: 19.5
    temperature: 15
    hvac_action: idle
    preset_mode: activity
    is_on: true
    hvac_mode: heat
    type: null
    is_controlled_by_central_mode: true
    last_central_mode: null
    frost_temp: 7
    eco_temp: 15
    boost_temp: 21
    comfort_temp: 19
    frost_away_temp: 0
    eco_away_temp: 0
    boost_away_temp: 0
    comfort_away_temp: 0
    power_temp: null
    target_temperature_step: 0.1
    ext_current_temperature: 12
    ac_mode: false
    current_power: null
    current_power_max: null
    saved_preset_mode: activity
    saved_target_temp: 15
    saved_hvac_mode: null
    motion_sensor_entity_id: binary_sensor.magic_areas_presence_tracking_badkamer_area_state
    motion_state: off
    power_sensor_entity_id: null
    max_power_sensor_entity_id: null
    overpowering_state: null
    presence_sensor_entity_id: null
    presence_state: null
    window_state: off
    window_auto_state: off
    window_bypass_state: false
    window_sensor_entity_id: null
    window_delay_sec: null
    window_auto_enabled: false
    window_auto_open_threshold: null
    window_auto_close_threshold: null
    window_auto_max_duration: null
    window_action: window_turn_off
    security_delay_min: 60
    security_min_on_percent: 0.5
    security_default_on_percent: 0.1
    last_temperature_datetime: 2024-09-27T20:35:48.020993+02:00
    last_ext_temperature_datetime: 2024-09-27T20:34:12.270759+02:00
    security_state: false
    minimal_activation_delay_sec: 5
    device_power: 1
    mean_cycle_power: null
    total_energy: 0
    last_update_datetime: 2024-09-27T20:35:48.029420+02:00
    timezone: Europe/Amsterdam
    temperature_unit: °C
    is_device_active: false
    ema_temp: 19.54
    is_used_by_central_boiler: true
    is_over_climate: true
    start_hvac_action_date: null
    underlying_climate_0: climate.trv_badkamer
    underlying_climate_1: null
    underlying_climate_2: null
    underlying_climate_3: null
    is_regulated: true
    regulated_target_temperature: 13.4
    auto_regulation_mode: auto_regulation_medium
    regulation_accumulated_error: -20
    auto_fan_mode: auto_fan_none
    current_auto_fan_mode: auto_fan_none
    auto_activated_fan_mode: null
    auto_deactivated_fan_mode: null
    auto_regulation_use_device_temp: true
    icon: phu:aqara-thermo-e1
    friendly_name: Badkamer
    supported_features: 401

    1x https://www.zigbee2mqtt.io/devices/BTH-RA.html#bosch-bth-ra

    hvac_modes: off, heat, auto
    min_temp: 5
    max_temp: 30
    target_temp_step: 0.5
    current_temperature: 19.6
    temperature: 13
    hvac_action: idle
    friendly_name: TRV Badkamer
    supported_features: 385
  4. climate.keuken:
    hvac_modes: off, heat
    min_temp: 15
    max_temp: 25
    target_temp_step: 0.1
    preset_modes: none, frost, eco, comfort, boost, activity
    current_temperature: 18.9
    temperature: 19
    preset_mode: activity
    is_on: true
    hvac_action: null
    hvac_mode: heat
    type: null
    is_controlled_by_central_mode: true
    last_central_mode: null
    frost_temp: 7
    eco_temp: 15
    boost_temp: 21
    comfort_temp: 19
    frost_away_temp: 0
    eco_away_temp: 0
    boost_away_temp: 0
    comfort_away_temp: 0
    power_temp: null
    target_temperature_step: 0.1
    ext_current_temperature: 12
    ac_mode: false
    current_power: null
    current_power_max: null
    saved_preset_mode: activity
    saved_target_temp: 19.5
    saved_hvac_mode: null
    motion_sensor_entity_id: binary_sensor.magic_areas_presence_tracking_beneden_area_state
    motion_state: on
    power_sensor_entity_id: null
    max_power_sensor_entity_id: null
    overpowering_state: null
    presence_sensor_entity_id: null
    presence_state: null
    window_state: off
    window_auto_state: off
    window_bypass_state: false
    window_sensor_entity_id: null
    window_delay_sec: null
    window_auto_enabled: false
    window_auto_open_threshold: null
    window_auto_close_threshold: null
    window_auto_max_duration: null
    window_action: window_turn_off
    security_delay_min: 60
    security_min_on_percent: 0.5
    security_default_on_percent: 0.1
    last_temperature_datetime: 2024-09-27T20:39:09.810765+02:00
    last_ext_temperature_datetime: 2024-09-27T20:34:12.267442+02:00
    security_state: false
    minimal_activation_delay_sec: 5
    device_power: 1
    mean_cycle_power: null
    total_energy: 0
    last_update_datetime: 2024-09-27T20:39:09.821650+02:00
    timezone: Europe/Amsterdam
    temperature_unit: °C
    is_device_active: true
    ema_temp: 18.94
    is_used_by_central_boiler: true
    is_over_climate: true
    start_hvac_action_date: null
    underlying_climate_0: climate.trv_keuken
    underlying_climate_1: null
    underlying_climate_2: null
    underlying_climate_3: null
    is_regulated: true
    regulated_target_temperature: 20.6
    auto_regulation_mode: auto_regulation_medium
    regulation_accumulated_error: 17.786718750000034
    auto_fan_mode: auto_fan_none
    current_auto_fan_mode: auto_fan_none
    auto_activated_fan_mode: null
    auto_deactivated_fan_mode: null
    auto_regulation_use_device_temp: true
    icon: phu:aqara-thermo-e1
    friendly_name: Keuken
    supported_features: 401

    1x https://www.zigbee2mqtt.io/devices/SRTS-A01.html#aqara-srts-a01

    hvac_modes: off, heat
    min_temp: 5
    max_temp: 30
    target_temp_step: 0.5
    preset_modes: none, manual, away, auto
    current_temperature: 18.9
    temperature: 18.5
    preset_mode: manual
    icon: phu:kitchen-alt
    friendly_name: Keuken
    supported_features: 401

And some a 'dummy' switch for living room that doesn't have a TRV (vtherm over switch)

However, if I understood @frenck correctly, it's a matter of versatile_thermostat providing the extra support flag(s) to indicate it will set min/max range in addition to 'only' temperature? EDIT: ofc not, it's the zigbee2mqtt thermostats that aren't providing the correct support flags...

tbrasser commented 1 month ago

I have workaround it (for my usecase, only heating devices no heat_cool), I just removed the min/max from the code (climate_thermostat.py and underlyings.py) and now it works as before.

jmcollin78 commented 1 month ago

I want to debug with HA 10.0.beta 1 but there is no such release in my dev environement. The last available is the 2024.9.3:

$ pip index versions homeassistant --no-cache-dir 
WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.
homeassistant (2024.9.3)
Available versions: 2024.9.3, 2024.9.2, 2024.9.1, 2024 ....

Maybe I am missing something. For now I'm stuck to fix this.

EDIT: we need to add --pre in the pip index versions command to see the beta but there is no corresponding release of pytest-homeassistant-custom-component and there are not compatible.

jmcollin78 commented 1 month ago

CleanShot 2024-09-27 at 19 49 03@2x

The integration report it only support setting a target temperature, not a range.

We constantly improve error checking in Home Assistant, thus this is now surfacing.

I read the beta 2024.10 release note and in the Climate section this breaking change is not mentioned. I think it should because, It is a breaking change (something that was working is no more working now). https://rc.home-assistant.io/blog/2024/09/25/release-202410/

jmcollin78 commented 1 month ago

Find something interesting: https://developers.home-assistant.io/blog/2024/09/24/climate-set-temp-validation

jmcollin78 commented 1 month ago

Hello @tbrasser ,

can you give a try to https://github.com/jmcollin78/versatile_thermostat/releases/tag/6.3.0.beta1 ? I have no TARGET_TEMPERATURE_RANGE device so I'm not able to fully test the fix.

Thank you !

EDIT: I install it over a HA 2024.09.3 and it is working as expected.