custom-components / climate.programmable_thermostat

Programmable thermostat that let you have a smart thermostat on budget.
The Unlicense
113 stars 35 forks source link

Added possibility to use related_climate as list (rooms more than 2) #33

Closed vldk closed 3 years ago

vldk commented 3 years ago

Hi there!

I was trying to configure my climate control with 3 rooms with one shared heater, but was found, that related_climate property supports only single entity. I've checked this code at my Home Assistance and seems like it works correctly (at least for heat mode).

Now it is possible to use related_climate as list of climate entities like this:


  - platform: programmable_thermostat
    name: pterm_room_11
    heater:
      - switch.complex_boiler
    related_climate:
      - climate.pterm_room_21
      - climate.pterm_room_22
    actual_temp_sensor: sensor.room11_temperature
    target_temp_sensor: input_number.dest_temp_11

  - platform: programmable_thermostat
    name: pterm_room_21
    heater:
      - switch.complex_boiler
    related_climate:
      - climate.pterm_room_11
      - climate.pterm_room_22
    actual_temp_sensor: sensor.room21_temperature
    target_temp_sensor: input_number.dest_temp_21

  - platform: programmable_thermostat
    name: pterm_room_22
    heater:
      - switch.complex_boiler
    related_climate:
      - climate.pterm_room_11
      - climate.pterm_room_21
    actual_temp_sensor: sensor.room22_temperature
    target_temp_sensor: input_number.dest_temp_22

Could you please review is my solution correct and merge this?

Thanks

MapoDan commented 3 years ago

Ciao,

You wont' belive me.. I just saw your PR becasue I was checking exactly for this option. I'll review it, test it and merge.