olegtarasov / esphome-opentherm

Create your own smart modulating thermostat using the OpenTherm component for ESPHome
BSD 2-Clause "Simplified" License
37 stars 6 forks source link

Fetch t_dhw_set and max_t_set when configured as numeric input #10

Open takerukoushirou opened 1 month ago

takerukoushirou commented 1 month ago

Thank you for the hard work on refining this component into an official ESPHome component!

I was experimenting with what sensors are supported by my heater (which sadly reports zero for many measurements that it certainly internally does) and what values can be set. Setting DHW and maximum CH setpoints is well supported and reflected on the device. I noticed an inconsistency though. When the two number inputs are defined, they show up in HA and can be set, but they initially start with blank inputs. If I instead configure sensors for t_dhw_set and max_t_set, they show the currently on the heater configured values. Defining both the number inputs and sensors again leads to initially blank inputs but also 0.0 as reported values for both sensors. It seems that when number inputs are configured, reading t_dhw_set and max_t_set is disabled or fails. It would be ideal if the number inputs could initially show the values configured on the heater.

Corresponding configuration segments:

output:
  - platform: opentherm
    t_set:
      id: opentherm_ch_set_temperature
      min_value: 30
      max_value: 80
      auto_max_value: true
      zero_means_zero: true

number:
  - platform: opentherm
    t_dhw_set:
      name: "Domestic hot water setpoint"
      auto_min_value: true
      auto_max_value: true
    max_t_set:
      name: "Central heating maximum setpoint"
      auto_min_value: true
      auto_max_value: true

# Sensors work when no number input is specified, otherwise read 0.0.
sensor:
  - platform: opentherm
    t_dhw_set:
      name: "Domestic hot water setpoint"
    max_t_set:
      name: "Central heating maximum setpoint"

Screenshot 2024-10-12 at 16 07 07

dwulkiewicz commented 1 week ago

Hi, the same thing happens when OUTPUT is defined. **output:

It would be useful to change the OUTPUT handling so that it writes a value to the boiler only when we call the id(max_t_set_output).set_level() action, because now it overwrites values ​​that can also be set in the boiler panel. For this reason, it is not possible to build the logic of reading the setpoint from the boiler via the sensor and updating it in HA.