ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
338 stars 49 forks source link

Question: do nothing after start #41

Closed Masterz69 closed 2 years ago

Masterz69 commented 2 years ago

Describe the bug IMHO something not right, pls check.

Configured entity, restarted HA Core. After HA started thermostat stay in Idle(Heat). Actual temp. is 17.5, target 20, but thermostat not switching heater.

Change target to 19.5 - Idle(Heat). Set to 20 - goes to Heating(Heat). Change back to 19.5 - again Idle(Heat).

Actual temp. all the time 17.5

  climate:
    - platform: smart_thermostat
      name: EntryR Floor ST
      unique_id: tms_entryr_floor_st
      heater: switch.rly_entryr_floor
      target_sensor: sensor.sth_entryr_floor_temperature
      min_temp: 7
      max_temp: 28
      ac_mode: False
      target_temp: 20
      keep_alive:
        seconds: 60
      away_temp: 14
      kp : 5
      ki : 0.01
      kd : 500
      pwm : 00:15:00

If thermostat waiting for new data from temperature sensor - why starts to heat if set back to 20 or more. And not starting on target 20, if not touching it.

Expected behavior When target/actual temp. difference is 2 degrees - heater to be switched on as soon as HA started.

Screenshots image

Desktop (please complete the following information):

Additional context HA Core 2021.11.5

ScratMan commented 2 years ago

Hello, it's due to the PWM starting with an OFF cycle if the PID output is not 100% as last changed time was set to boot time. I fixed this in v2021.12.2-beta6