ScratMan / HASmartThermostat

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

[Request] Set preset temperatures at run time #17

Closed ScratMan closed 2 years ago

ScratMan commented 2 years ago

Discussed in https://github.com/ScratMan/HASmartThermostat/discussions/14

Originally posted by **nagyrobi** November 17, 2021 One of the problems of HA's built-in `generic_thermostat` is that the temperature for `away` mode is hardcoded in the configuration, it cannot be adjusted at run time. Thankfully `smart_thermostat` supports `away`, `eco`, `boost`, `comfort`, `home`, `sleep`, `activity` each with its own temperature value configurable. It would be nice to have the possibility to adjust these during runtime, and use HA's history database to always restore to the last known value after restart.
m4dm4rtig4n commented 2 years ago

Personally, I am waiting for this feature to switch to Smart thermostat. Without this mode, I have to review my management of the heating systems, which work with dynamic presets :/

ScratMan commented 2 years ago

Hello @m4dm4rtig4n, could you please give a try to v2021.11.9-beta2 that includes a service to set the preset temperatures through Home Assistant UI ? Thanks

m4dm4rtig4n commented 2 years ago

I have try but i have lost all current present :/

My config :

- platform: smart_thermostat
  name: {{ climate_ha }}
  unique_id: {{ climate_ha }}
  heater: {{ climate.heater }}
  target_sensor: {{climate.target_sensor}}
  min_temp: 7
  max_temp: 26
  ac_mode: false
  min_cycle_duration:
    seconds: 5
  keep_alive:
    minutes: 3
  initial_hvac_mode: "heat"
  precision: 0.1
  kp: 5
  ki: 0.01
  kd: 500
  pwm: 00:15:00

image

ScratMan commented 2 years ago

Hi, you should try by either keeping the preset temperatures settings in the YAML, or try to use the service once to set the presets you want. Maybe you'll need to reload the integration after (use smart thermostat reload service).

In my tests, I had 4 presets already defined in the YAML and successfully added a new one with the service.

ScratMan commented 2 years ago

Closed with release v2021.11.9