custom-components / climate.programmable_thermostat

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

Target temperature changes from an entity-target do not update #62

Open Hiekkaharju opened 1 year ago

Hiekkaharju commented 1 year ago

I've a template sensor(s) for target temperature. And using only heat-function, not cool. When the the value of the target sensor changes, thermostat does not update it's target. Adding an else to climate.py lines 244-> helps in my situation:

    if self._hvac_mode == HVAC_MODE_HEAT_COOL:
        self._async_restore_program_temp()

I'm not a python programmer and I've not studied properly if this is the correct way to do this or if it has adverse effects in other use cases. Thus I'm not making a pull request.

Thanks for making this integration, it helped me a lot in creating an a bit complex weather and electricity price adaptive heating control system for a largish boiler with two power levels and three temperature measurements.

vdiogo commented 8 months ago

I have the same issue. Was about to open a new issue, when saw this one. I'm also using the heat function only, and the target temperature is controlled by node-red (thermostat node). This is the config.yaml for one of my thermostats:

climate:
  - platform: programmable_thermostat
    name: escritorio
    heater: 
      - switch.shelly_shsw_1_8caab5061a27
    actual_temp_sensor: sensor.temperatura_escritorio_temperature
    min_temp: 15
    max_temp: 25
    target_temp_sensor: sensor.temperatura_alvo_escritorio_2
    tolerance: 0.3
    hvac_options: 7
    auto_mode: heating