jmcollin78 / versatile_thermostat

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

Problems with ESPHome climate component #176

Closed LaneaLucy closed 1 year ago

LaneaLucy commented 1 year ago

Version of the custom_component

4.0.1

ESPHome 2023.10.3

Configuration

My VTherm attributes are the following:

hvac_modes:
  - "off"
  - heat_cool
  - cool
  - heat
min_temp: 7
max_temp: 35
target_temp_step: 0.5
preset_modes:
  - none
  - eco
  - comfort
  - boost
  - activity
current_temperature: 23.6
temperature: 31
target_temp_high: 35
target_temp_low: 7
hvac_action: idle
preset_mode: none
hvac_mode: heat
type: null
eco_temp: 19
boost_temp: 25
comfort_temp: 22
eco_away_temp: 17
boost_away_temp: 22
comfort_away_temp: 20
power_temp: 13
ext_current_temperature: 10.3
ac_mode: true
current_power: null
current_power_max: null
saved_preset_mode: none
saved_target_temp: 28
saved_hvac_mode: null
window_state: "off"
motion_state: null
overpowering_state: null
presence_state: null
window_auto_state: "off"
window_bypass_state: false
security_delay_min: 60
security_min_on_percent: 0.5
security_default_on_percent: 0.1
last_temperature_datetime: "2023-11-07T14:52:58.842692+01:00"
last_ext_temperature_datetime: "2023-11-07T14:49:34.022708+01:00"
security_state: false
minimal_activation_delay_sec: 10
device_power: 1
mean_cycle_power: null
total_energy: 0
last_update_datetime: "2023-11-07T15:00:34.786843+01:00"
timezone: Europe/Berlin
window_sensor_entity_id: null
window_delay_sec: 30
window_auto_open_threshold: null
window_auto_close_threshold: null
window_auto_max_duration: null
motion_sensor_entity_id: binary_sensor.presence_sensor_fp2_4edb_presence_sensor_1
presence_sensor_entity_id: null
power_sensor_entity_id: null
max_power_sensor_entity_id: null
is_over_climate: true
start_hvac_action_date: null
underlying_climate_0: climate.wohnzimmer_thermostat
underlying_climate_1: null
underlying_climate_2: null
underlying_climate_3: null
friendly_name: Versatile Thermostat
supported_features: 19

ESPHome config:

esphome:
  name: test-thermostat

esp8266:
  board: nodemcuv2

#external_components:
#  - source: my_components

external_components:
  - source: github://pr#4105
    components: [ display_menu_base, graphical_display_menu, display, graph, font ]

# Enable logging
logger:
  level: DEBUG
  logs:
    mqtt.component: DEBUG
    component: ERROR
    sensor: DEBUG
    dht: INFO
    climate: DEBUG
    wifi: DEBUG
    wifi_esp8266: DEBUG

# Enable Home Assistant API
api:
  encryption:
    key: SECRET

ota:
  password: SECRET

substitutions:
  room: Wohnzimmer # Room Name
  entity_heater: input_boolean.tut_thermo_fire    ### Change for your 'Heating' Entity
  entity_cooler: input_boolean.tut_thermo_cool    ### Change for your 'Cooling' Entity
  default_low: "20"
  default_hi: "23"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Test-Thermostat Fallback Hotspot"
    password: SECRET

captive_portal:

sensor:
  - platform: dht
    pin: D0
    temperature:
      name: "Temperature"
      id: temp
    humidity:
      name: "Humidity"
      id: humi
    update_interval: 10s
  - platform: rotary_encoder
    id: encoder
    pin_a:
      number: D6
      #mode: INPUT_PULLUP
    pin_b:
      number: D5
      #mode: INPUT_PULLUP
    on_anticlockwise:
      - if:
          condition:
            display.is_displaying_page: change_page
          then:
            lambda: 'id(this_thermostat).target_temperature = id(this_thermostat).target_temperature - 0.5;'
          else:
            - if:
                condition:
                  display_menu.is_active:
                then:
                  - display_menu.up:
                else:
                  - display.page.show: change_page
    on_clockwise:
      - if:
          condition:
            display.is_displaying_page: change_page
          then:
            lambda: 'id(this_thermostat).target_temperature = id(this_thermostat).target_temperature + 0.5;'
          else:
            - if:
                condition:
                  display_menu.is_active:
                then:
                  - display_menu.down:
                else:
                  - display.page.show: change_page

i2c:
  sda: D1
  scl: D2

switch:
  - platform: gpio
    id: relay_heater
    name: "heater"
    pin: D4
    inverted: true
  #- platform: gpio
  #  id: relay_cooler
  #  pin: D5
  #  inverted: true
  #- platform: template
  #  id: heat_cool
  #  optimistic: true

binary_sensor:
  - platform: gpio
    id: button
    pin:
      number: D3
      inverted: true
    filters:
      - delayed_on: 10ms
      - delayed_off: 10ms
    on_press:
      #then:
      - if:
          condition:
            display.is_displaying_page: change_page
          then:
            - display.page.show: home_page
          else:
            - if:
                condition:
                  display_menu.is_active:
                then:
                  - display_menu.enter:
                else:
                  - display_menu.show:
  - platform: template
    id: fire
  - platform: template
    id: cool

#display_menu:
graphical_display_menu:
  id: oled_display_menu
  #display_id: oled_display
  display: oled_display
  #on_redraw:
  #  then:
  #    component.update: oled_display
  font: font3
  active: False
  mode: rotary
  on_enter:
    then:
      lambda: 'ESP_LOGI("display_menu", "root enter");'
  on_leave:
    then:
      lambda: 'ESP_LOGI("display_menu", "root leave");'
  items:
    - type: command
      text: 'Zurueck'
      on_value:
        then:
          - display_menu.hide:
          - display.page.show: home_page
          #- component.update: oled_display
    - type: command
      text: 'Test'
      on_value:
        then:
          - display_menu.hide:
          - display.page.show: test_page
          #- component.update: oled_display
    #- type: back
    #  text: 'Back'
    #- type: label
    #  text: 'Label 1'
    #- type: number
    #  text: 'SOLL'
    #  format: '%.2f'
    #  number: my_number
    #  on_enter:
    #    then:
    #      lambda: 'ESP_LOGI("display_menu", "number enter: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
    #  on_leave:
    #    then:
    #      lambda: 'ESP_LOGI("display_menu", "number leave: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
    #  on_value:
    #    then:
    #      lambda: 'ESP_LOGI("display_menu", "number value: %s, %s", it->get_text().c_str(), it->get_value_text().c_str());'
    - type: custom
      immediate_edit: false
      text: 'SOLL'
      value_lambda: 'return str_snprintf("%.1f°C", 32, id(this_thermostat).target_temperature);'
      on_next:
        then:
          lambda: 'id(this_thermostat).target_temperature = id(this_thermostat).target_temperature + 0.5;'
      on_prev:
        then:
          lambda: 'id(this_thermostat).target_temperature = id(this_thermostat).target_temperature - 0.5;'
    - type: label
      text: !lambda |-
        return "platzhalter";

number:
  - platform: template
    id: my_number
    optimistic: true
    min_value: 15.0
    max_value: 30.0
    step: 0.5
    on_value:
      then:
        lambda: 'id(this_thermostat).target_temperature = x;'

display:
  - platform: ssd1306_i2c
    id: oled_display
    model: "SH1106 128x64"
    address: 0x3C
    update_interval: 0.5s
    pages:
      - id: home_page
        lambda: |-
          it.printf(112, 5, id(font3), TextAlign::TOP_RIGHT, "%s", LOG_STR_ARG(climate_mode_to_string(id(this_thermostat).mode)));

          if (id(this_thermostat).mode > 0) {
            if (id(this_thermostat).action == CLIMATE_ACTION_HEATING ) {
              id(heat_animation).next_frame();
              // Draw the animation my_animation at position [x=0,y=0]
              it.image(112, 56, id(heat_animation), ImageAlign::BOTTOM_RIGHT, COLOR_OFF, COLOR_ON);
            } else {
              it.printf(112, 46, id(font3), TextAlign::TOP_RIGHT, "%s", LOG_STR_ARG(climate_action_to_string(id(this_thermostat).action)));
            }

            it.printf(112, 23, id(font3), TextAlign::TOP_RIGHT, "%.1f°C", id(this_thermostat).target_temperature);
          } 

          it.printf(16, 5, id(font3), TextAlign::TOP_LEFT, "IST");

          // Print inside temperature
          if (id(temp).has_state()) {
            it.printf(16, 23, id(font3), TextAlign::TOP_LEFT, "%.1f°C", id(temp).state);
          }
          // Print realtive humidity
          if (id(humi).has_state()) {
            it.printf(16, 46, id(font3), TextAlign::TOP_LEFT, "%.1f%%", id(humi).state);
          }
      - id: change_page
        lambda: |-
          int x1;
          int y1;
          int width;
          int height;
          it.get_text_bounds(80, 23, "88.8°C", id(font3), display::TextAlign::TOP_LEFT, &x1, &y1, &width, &height);
          it.filled_rectangle(x1 - 2, y1, width + 4, height);

          it.printf(80, 5, id(font3), TextAlign::TOP_LEFT, "SOLL");

          it.printf(80, 23, id(font3), COLOR_OFF, TextAlign::TOP_LEFT, "%.1f°C", id(this_thermostat).target_temperature);
      - id: test_page
        lambda: |-
          id(heat_animation).next_frame();
          // Draw the animation my_animation at position [x=0,y=0]
          it.image(20, 20, id(heat_animation), COLOR_OFF, COLOR_ON);

    #  - id: advanced_drawing_mode_page
    #    lambda: |-
    #      const auto display_width = it.get_width();
    #      const auto display_height = it.get_height();
    #
    #      // Arguments: it.menu(x, y, menu, width, height);
    #      it.menu(0, 0, id(oled_display_menu), display_width, display_height);
    #  - id: menu_page
    #    lambda: |-
    #      const auto display_width = it.get_width();
    #      const auto display_height = it.get_height();
    #
    #      it.print(0, 0, id(font1), COLOR_ON, TextAlign::TOP_LEFT, "Other drawing example");
    #
    #      const auto font_height = 20;
    #      it.menu(0, font_height, id(oled_display_menu), display_width , display_height - font_height);

    #lambda: |-
    #  id(oled_display_menu).draw_and_update();

    #lambda: |-
    #  if (!id(oled_display_menu).is_active()) {
    #    // Print in top center.
    #    //it.printf(64, 0, id(font1), TextAlign::TOP_CENTER, "Thermostat Test");
    #
    #    // Print time in HH:MM format
    #    //it.strftime(0, 60, id(font1), TextAlign::BASELINE_LEFT, "%H:%M", id(esptime).now());
    #
    #    if (id(this_thermostat).mode > 0) {
    #      it.printf(80, 5, id(font3), TextAlign::TOP_LEFT, "SOLL");
    #
    #      it.printf(80, 23, id(font3), TextAlign::TOP_LEFT, "%.1f°C", id(this_thermostat).target_temperature);
    #    }
    #
    #    it.printf(16, 5, id(font3), TextAlign::TOP_LEFT, "IST");
    #
    #    // Print inside temperature
    #    if (id(temp).has_state()) {
    #      it.printf(16, 23, id(font3), TextAlign::TOP_LEFT, "%.1f°C", id(temp).state);
    #    }
    #    // Print realtive humidity
    #    if (id(humi).has_state()) {
    #      it.printf(16, 46, id(font3), TextAlign::TOP_LEFT, "%.1f%%", id(humi).state);
    #    }
    #  }// else {
    #    const auto display_width = it.get_width();
    #    const auto display_height = it.get_height();
    #
    #    it.print(0, 0, id(font3), COLOR_ON, TextAlign::TOP_LEFT, "Other drawing example");
    #
    #    const auto font_height = 10;
    #    it.menu(0, font_height, id(oled_display_menu), display_width , display_height - font_height);
    #  }

font:
  - file: 'fonts/slkscr.ttf'
    id: font1
    size: 8

  - file: 'fonts/BebasNeue-Regular.ttf'
    id: font2
    size: 48

  - file: 'fonts/arial.ttf'
    id: font3
    size: 10

image:
  - file: "pngwing.com.png"
    id: my_image
    resize: 100x100

animation:
  - file: "flame.gif"
    id: heat_animation
    resize: 30x30

climate:
  - platform: thermostat
    min_cooling_off_time: 0s
    min_cooling_run_time: 0s
    min_heating_off_time: 0s
    min_heating_run_time: 0s
    min_idle_time: 0s
    visual:
      min_temperature: 5 °C
      max_temperature: 35 °C
      temperature_step: 0.5
    name: "${room} Thermostat"
    id: this_thermostat
    sensor: temp

### Updated for ESPHome v2022.10.0 Onwards
    default_preset: Home                      ### NEW! Use this to set Preset
    on_boot_restore_from: memory            ### Use this to "Restore From Memeory" (A Saved State) OR...
    #on_boot_restore_from: default_preset      ### Use this to set Preset to start on every Boot    
    preset:
      - name: Home
        default_target_temperature_low: $default_low
        default_target_temperature_high: $default_hi
        mode: HEAT
###########################################

    cool_action:
    #  - switch.turn_on: relay_cooler
      - lambda: id(cool).publish_state(true);
      - homeassistant.service:
          service: homeassistant.turn_on
          data:
            entity_id: $entity_cooler

    heat_action:
      - switch.turn_on: relay_heater
      - lambda: id(fire).publish_state(true);
      - homeassistant.service:
          service: homeassistant.turn_on
          data:
            entity_id: $entity_heater

    idle_action:
      #- switch.turn_off: relay_cooler
      - switch.turn_off: relay_heater
      - lambda: id(cool).publish_state(false);
      - lambda: id(fire).publish_state(false);
      - homeassistant.service:
          service: homeassistant.turn_off
          data:
            entity_id: $entity_cooler
      - homeassistant.service:
          service: homeassistant.turn_off
          data:
            entity_id: $entity_heater

Describe the bug

when using a esphome climate entity as thermostat in versatile thermostat and it try to changes temperature, i get the following error in esphome log: Cannot set target temperature for climate device with two-point target temperature! after this the setpoint low gets reset to 7°C and setpoint high to 35°C inside esphome. it looks like versatile thermostat trys to set the target temperature, but because the esphome thermostat can do cool and heat, it must set taget low and target high.

I read the documentation on the README.md file and I don't find any relevant information about this issue.

Debug log

Home Assistant:

2023-11-07 15:10:38.023 INFO (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Test - Set target temp: 31.0
2023-11-07 15:10:38.023 DEBUG (MainThread) [custom_components.versatile_thermostat.pi_algorithm] PITemperatureRegulator - Error: 7.40 accumulated_error: 0.00 offset: 0.00 offset_ext: 0.00 target_tem: 31.0 regulatedTemp: 31.0
2023-11-07 15:10:38.023 INFO (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Test - Regulated temp have changed to 31.0. Resend it to underlyings
2023-11-07 15:10:38.024 DEBUG (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Test - recalculate all
2023-11-07 15:10:38.024 DEBUG (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Test - Calling update_custom_attributes: {'hvac_action': <HVACAction.IDLE: 'idle'>, 'hvac_mode': 'heat', 'preset_mode': 'none', 'type': None, 'eco_temp': 19.0, 'boost_temp': 25.0, 'comfort_temp': 22.0, 'eco_away_temp': 17.0, 'boost_away_temp': 22.0, 'comfort_away_temp': 20.0, 'power_temp': 13.0, 'ext_current_temperature': 10.2, 'ac_mode': True, 'current_power': None, 'current_power_max': None, 'saved_preset_mode': 'none', 'saved_target_temp': 28.0, 'saved_hvac_mode': None, 'window_state': 'off', 'motion_state': None, 'overpowering_state': None, 'presence_state': None, 'window_auto_state': 'off', 'window_bypass_state': False, 'security_delay_min': 60, 'security_min_on_percent': 0.5, 'security_default_on_percent': 0.1, 'last_temperature_datetime': '2023-11-07T15:09:28.848834+01:00', 'last_ext_temperature_datetime': '2023-11-07T15:09:34.457464+01:00', 'security_state': False, 'minimal_activation_delay_sec': 10, 'device_power': 1.0, 'mean_cycle_power': None, 'total_energy': 0, 'last_update_datetime': '2023-11-07T15:10:38.024243+01:00', 'timezone': 'Europe/Berlin', 'window_sensor_entity_id': None, 'window_delay_sec': 30, 'window_auto_open_threshold': None, 'window_auto_close_threshold': None, 'window_auto_max_duration': None, 'motion_sensor_entity_id': 'binary_sensor.presence_sensor_fp2_4edb_presence_sensor_1', 'presence_sensor_entity_id': None, 'power_sensor_entity_id': None, 'max_power_sensor_entity_id': None, 'is_over_climate': True, 'start_hvac_action_date': None, 'underlying_climate_0': 'climate.wohnzimmer_thermostat', 'underlying_climate_1': None, 'underlying_climate_2': None, 'underlying_climate_3': None}
2023-11-07 15:10:38.025 DEBUG (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Test - last_change_time is now 2023-11-07 15:10:38.025320+01:00
2023-11-07 15:10:38.025 DEBUG (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Test - Checking new cycle. hvac_mode=heat, security_state=False, preset_mode=none
2023-11-07 15:10:38.025 DEBUG (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Test - power not configured. check_overpowering not available
2023-11-07 15:10:38.025 DEBUG (MainThread) [custom_components.versatile_thermostat.base_thermostat] VersatileThermostat-Test - checking security delta_temp=1.2 delta_ext_temp=1.1 mod_cond=True temp_cond=False climate_cond=False switch_cond=False
2023-11-07 15:10:38.026 DEBUG (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Test - Calling update_custom_attributes: {'hvac_action': <HVACAction.IDLE: 'idle'>, 'hvac_mode': 'heat', 'preset_mode': 'none', 'type': None, 'eco_temp': 19.0, 'boost_temp': 25.0, 'comfort_temp': 22.0, 'eco_away_temp': 17.0, 'boost_away_temp': 22.0, 'comfort_away_temp': 20.0, 'power_temp': 13.0, 'ext_current_temperature': 10.2, 'ac_mode': True, 'current_power': None, 'current_power_max': None, 'saved_preset_mode': 'none', 'saved_target_temp': 28.0, 'saved_hvac_mode': None, 'window_state': 'off', 'motion_state': None, 'overpowering_state': None, 'presence_state': None, 'window_auto_state': 'off', 'window_bypass_state': False, 'security_delay_min': 60, 'security_min_on_percent': 0.5, 'security_default_on_percent': 0.1, 'last_temperature_datetime': '2023-11-07T15:09:28.848834+01:00', 'last_ext_temperature_datetime': '2023-11-07T15:09:34.457464+01:00', 'security_state': False, 'minimal_activation_delay_sec': 10, 'device_power': 1.0, 'mean_cycle_power': None, 'total_energy': 0, 'last_update_datetime': '2023-11-07T15:10:38.025920+01:00', 'timezone': 'Europe/Berlin', 'window_sensor_entity_id': None, 'window_delay_sec': 30, 'window_auto_open_threshold': None, 'window_auto_close_threshold': None, 'window_auto_max_duration': None, 'motion_sensor_entity_id': 'binary_sensor.presence_sensor_fp2_4edb_presence_sensor_1', 'presence_sensor_entity_id': None, 'power_sensor_entity_id': None, 'max_power_sensor_entity_id': None, 'is_over_climate': True, 'start_hvac_action_date': None, 'underlying_climate_0': 'climate.wohnzimmer_thermostat', 'underlying_climate_1': None, 'underlying_climate_2': None, 'underlying_climate_3': None}
2023-11-07 15:10:38.026 DEBUG (MainThread) [custom_components.versatile_thermostat.pi_algorithm] PITemperatureRegulator - Error: 7.40 accumulated_error: 0.00 offset: 0.00 offset_ext: 0.00 target_tem: 31.0 regulatedTemp: 31.0
2023-11-07 15:10:38.026 DEBUG (MainThread) [custom_components.versatile_thermostat.thermostat_climate] VersatileThermostat-Test - dtemp (0.0) is < 0.5 -> forget the regulation send
2023-11-07 15:10:38.031 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Test_security_state - climate state change
2023-11-07 15:10:38.031 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Test_window_bypass_state - climate state change
2023-11-07 15:10:38.031 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Test_motion_state - climate state change
2023-11-07 15:10:38.032 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_last_temp_datetime - climate state change
2023-11-07 15:10:38.032 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_last_ext_temp_datetime - climate state change
2023-11-07 15:10:38.032 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_temperature_slope - climate state change
2023-11-07 15:10:38.032 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_energy - climate state change
2023-11-07 15:10:38.032 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_regulated_temperature - climate state change
2023-11-07 15:10:38.032 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Test_security_state - climate state change
2023-11-07 15:10:38.033 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Test_window_bypass_state - climate state change
2023-11-07 15:10:38.033 DEBUG (MainThread) [custom_components.versatile_thermostat.binary_sensor] Test_motion_state - climate state change
2023-11-07 15:10:38.033 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_last_temp_datetime - climate state change
2023-11-07 15:10:38.033 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_last_ext_temp_datetime - climate state change
2023-11-07 15:10:38.033 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_temperature_slope - climate state change
2023-11-07 15:10:38.033 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_energy - climate state change
2023-11-07 15:10:38.033 DEBUG (MainThread) [custom_components.versatile_thermostat.sensor] Test_regulated_temperature - climate state change

ESPHome:

[15:13:58][D][sensor:093]: 'Temperature': Sending state 23.60000 °C with 1 decimals of accuracy
[15:13:58][D][climate:380]: 'Wohnzimmer Thermostat' - Sending state:
[15:13:58][D][climate:383]:   Mode: HEAT
[15:13:58][D][climate:385]:   Action: IDLE
[15:13:58][D][climate:394]:   Preset: HOME
[15:13:58][D][climate:403]:   Current Temperature: 23.60°C
[15:13:58][D][climate:406]:   Target Temperature: Low: 7.00°C High: 35.00°C
[15:13:58][D][sensor:093]: 'Humidity': Sending state 49.00000 % with 0 decimals of accuracy
[15:14:08][D][sensor:093]: 'Temperature': Sending state 23.60000 °C with 1 decimals of accuracy
[15:14:08][D][climate:380]: 'Wohnzimmer Thermostat' - Sending state:
[15:14:08][D][climate:383]:   Mode: HEAT
[15:14:08][D][climate:385]:   Action: IDLE
[15:14:08][D][climate:394]:   Preset: HOME
[15:14:08][D][climate:403]:   Current Temperature: 23.60°C
[15:14:08][D][climate:406]:   Target Temperature: Low: 7.00°C High: 35.00°C
[15:14:08][D][sensor:093]: 'Humidity': Sending state 49.00000 % with 0 decimals of accuracy
[15:14:18][D][sensor:093]: 'Temperature': Sending state 23.60000 °C with 1 decimals of accuracy
[15:14:18][D][climate:380]: 'Wohnzimmer Thermostat' - Sending state:
[15:14:18][D][climate:383]:   Mode: HEAT
[15:14:18][D][climate:385]:   Action: IDLE
[15:14:18][D][climate:394]:   Preset: HOME
[15:14:18][D][climate:403]:   Current Temperature: 23.60°C
[15:14:18][D][climate:406]:   Target Temperature: Low: 7.00°C High: 35.00°C
[15:14:18][D][sensor:093]: 'Humidity': Sending state 49.00000 % with 0 decimals of accuracy
[15:14:21][D][climate:011]: 'Wohnzimmer Thermostat' - Setting
[15:14:21][W][climate:097]:   Cannot set target temperature for climate device with two-point target temperature!
[15:14:21][D][climate:043]:   Target Temperature Low: 7.00
[15:14:21][D][climate:046]:   Target Temperature High: 35.00
[15:14:21][D][climate:380]: 'Wohnzimmer Thermostat' - Sending state:
[15:14:21][D][climate:383]:   Mode: HEAT
[15:14:21][D][climate:385]:   Action: IDLE
[15:14:21][D][climate:394]:   Preset: HOME
[15:14:21][D][climate:403]:   Current Temperature: 23.60°C
[15:14:21][D][climate:406]:   Target Temperature: Low: 7.00°C High: 35.00°C
[15:14:28][D][sensor:093]: 'Temperature': Sending state 23.60000 °C with 1 decimals of accuracy
[15:14:28][D][climate:380]: 'Wohnzimmer Thermostat' - Sending state:
[15:14:28][D][climate:383]:   Mode: HEAT
[15:14:28][D][climate:385]:   Action: IDLE
[15:14:28][D][climate:394]:   Preset: HOME
[15:14:28][D][climate:403]:   Current Temperature: 23.60°C
[15:14:28][D][climate:406]:   Target Temperature: Low: 7.00°C High: 35.00°C
[15:14:28][D][sensor:093]: 'Humidity': Sending state 49.00000 % with 0 decimals of accuracy
jmcollin78 commented 1 year ago

Hello @LaneaLucy ,

Can you be more explicit on what is wrong ?

You said:

it looks like versatile thermostat trys to set the target temperature, but because the esphome thermostat can do cool and heat, it must set taget low and target high.

but Vtherm is already controling re versi le HVAC device which can do cool and heating without problem. What goes wrong with you esphome ? Isn't it a problem in your esphome code ? (which i cannot understand myself)

LaneaLucy commented 1 year ago

Like it says in the error message, Cannot set target temperature for climate device with two-point target temperature! It looks like versatile thermostat trys to set a one-point target temperature and the esphome climate component with heating and cooling needs a two-point target temperature. At least that's how I understand it. Home assistant itself can change both high and low targets, but whenever versatile thermostat trys to set the target temperature, I get this error message

jmcollin78 commented 1 year ago

What is one-point or two-points target temperature ? I don't understand what are you telling about. A target temperature is a target temperature and nothing else. If I want 21° in my room, I send 21° and not two temperature.

I think there is big misunderstanding somewhere. I never heard about this. I continue to think that the esphome code is wrong and not the VTherm.

LaneaLucy commented 1 year ago

If you want to cool and heat, you don't want them both at the same temperature. For example I want heat until 21°C and cooling from 23°C. Those are low target, the minimal heating temperature and high target, the highest temperature, before cooling kick's in

jmcollin78 commented 1 year ago

Ok. I've got it. VTherm will not be able to manage this. The way it is working is the following: VTherm adapt the target temperature to the current mode (cool or heat) bit doesn't handle the both mode in parallel. I don't see how to simply add this feature. Very sorry for that. The only light I see if the VTherm over climate of you already have a working climate entity in HA. See in documentation if you don't know what I'm talking about.

LaneaLucy commented 1 year ago

It has already a working climate entity and when using it, together with the Lovelace card, it even has two-point target....

LaneaLucy commented 1 year ago

Screenshot_20231108_102347_Home Assistant

LaneaLucy commented 1 year ago

So why can I set it, but versatile thermostat don't support it?

jmcollin78 commented 1 year ago

Because I never heard about this feature until now. And the Awesome Thermostat from which VTherm have been forked, not either.

Le mer. 8 nov. 2023, 10:30, Lanea Lucy @.***> a écrit :

So why can I set it, but versatile thermostat don't support it?

— Reply to this email directly, view it on GitHub https://github.com/jmcollin78/versatile_thermostat/issues/176#issuecomment-1801407656, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANCB5UXJV2MPEURCLZ2BH3YDNGJZAVCNFSM6AAAAAA7BIKJ7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBRGQYDONRVGY . You are receiving this because you commented.Message ID: @.***>

LaneaLucy commented 1 year ago

Could this be added?

jmcollin78 commented 1 year ago

I don't even know how to do that. I never heard about this feature and a lot to do.

If someone in the community have time to look at it maybe I will be able to do something.

So unfortunatelty, for now is answser is now at short or middle terms. I will put it in question and enhancement.

jmcollin78 commented 1 year ago

I will close this actually. Please open a discussion if you think it is relevant.