ScratMan / HASmartThermostat

Smart Thermostat with PID controller for HomeAssistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

specific configuration seems to be ignored

echavet opened this issue · comments

Describe the bug
When setting specific values in the configuration.yaml file, and checking for these values in the matching thermostat entity's attributes, I don't see my custom values but the default ones.

To Reproduce
Steps to reproduce the behavior:

  1. Edit configuration file and set default values for pid correction factors
  2. Restart homeassistant
  3. Edit configuration file and set custom other values for pid correction factors
  4. Restart homeassistant
  5. Add an entity card to your dashboard and specify kd or ki or any else attribute
  6. Look at the values
  7. They don't match

Expected behavior
I expected the configured thermostat entity's attributes to match the configured values in the yaml file.

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser : Brave
  • Version: latest

Additional context
latest HACS and PID version
configuration:

climate:
  - platform: smart_thermostat
    name: Thermostat Bureau
    unique_id: smart_thermostat_bureau
    heater: switch.tz3000_typdpbpg_ts011f_commutateur
    target_sensor: sensor.ble_temperature_a4c13800de4b
    min_temp: 7
    max_temp: 22
    ac_mode: False
    target_temp: 19
    keep_alive:
      seconds: 60
    away_temp: 15
    kp: 8
    ki: 0.002
    kd: 1600
    pwm: 00:40:00

When calling the service, it works.

service: smart_thermostat.set_pid_gain
target:
  entity_id: climate.thermostat_bureau
data:
  kp: 8
  ki: 0.002
  kd: 1600

I'm having a similar problem. When I change the target temperature setting of an existing configuration in configuration.yaml and restart home assistant, the change I made is lost after restarting home assistant.
When I use developer tools - status and I change the temperature attribute, it changes but returns to the old value after a few seconds.
When I change the target temperature via the climate card the changed temperature stays even after an update.

That's normal behaviour. The preset temperatures and PID gains from yaml are only used when creating the thermostat for the first time or after HA database is corrupted or deleted.
On already existing thermostat, the settings can only be adjusted in HA using services; and last known values are restored from database after a restart.