ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant
345 stars 50 forks source link

How to change presets? #5

Closed widewing closed 2 years ago

widewing commented 2 years ago

I installed and configured this component successfully, but what i can only do is set a target temperature, I see no where to change the defined presets.. I want to put it into sleep mode when I'm sleeping.

Also in the entity page, it suggests "This entity ('climate.smart_thermostat_living_room') does not have a unique ID, therefore its settings cannot be managed from the UI. See the documentation for more detail."

ScratMan commented 2 years ago

Hello, you need to change the configuration of the smart thermostat in the YAML file, to add the required preset temperatures. You may use one or several of the parameters shown in the readme file :

Then the enable presets will be available in the thermostat entity panel as drop-down list as shown : Screenshot_2021-11-15-14-00-51-59_c3a231c25ed346e59462e84656a70e50

widewing commented 2 years ago

@ScratMan I set these items as in below configurations:

climate:
  - platform: smart_thermostat
    name: Smart Thermostat - Living Room
    heater: switch.living_room_heater
    target_sensor: sensor.ble_temperature_e72e0171f422
    min_temp: 7
    max_temp: 28
    ac_mode: False
    target_temp: 19
    keep_alive:
      seconds: 60
    away_temp: 0
    sleep_temp: 17
    home_temp: 19
    kp : 75
    ki : 0.001
    kd : 70000
    pwm : 00:15:00

However I see only Operation for heat or off: image

ScratMan commented 2 years ago

What version are you using ? And did you restart HA after editing the YAML ?

Edit: there may be a concern with your away temp, 0 is below the min target temp. Need to check the behavior of HA in this case.

ScratMan commented 2 years ago

I could reproduce the issue by setting away_temp to 0. The preset selector then disappears after restart.

ScratMan commented 2 years ago

Please update to release v2021.11.7, it fixes this issue by allowing setting a preset temperature to 0.