ScratMan / HASmartThermostat

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

Shared values between several thermostat #76

Closed Adorem closed 2 years ago

Adorem commented 2 years ago

Hello,

I'm using several thermostat. Each have different settings but it seems they all shared the same limits defines in the first one.

E.g. with this:

climate:
  - platform: smart_thermostat
    name: Thermostat salon
    unique_id: smart_thermostat_salon
    heater: switch.sonoff_4ch_relay_3
    target_sensor: sensor.temperature_salon
    outdoor_sensor: sensor.wemos_teleinfo_temperature
    min_temp: 18
    max_temp: 25
    ac_mode: False
    target_temp: 21
    target_temp_step: 0.1
    keep_alive:
      seconds: 60
    away_temp: 18
    home_temp: 21
    kp: 3.6834316626861
    ki: 0.030695589940704194
    kd: 110.50177598710151
    ke: 0.6
    pwm: 00:05:00
  - platform: smart_thermostat
    name: Thermostat sous-sol
    unique_id: smart_thermostat_sous_sol
    heater: group.chauffage_sous_sol
    target_sensor: sensor.emoncms_temp_sous_sol
    outdoor_sensor: sensor.wemos_teleinfo_temperature
    min_temp: 10
    max_temp: 22
    ac_mode: False
    target_temp: 14
    target_temp_step: 0.1
    keep_alive:
      seconds: 60
    away_temp: 14
    home_temp: 19
    kp: 0.93620554759938432805225743160303
    ki: 1.929150825356307100228894101485
    kd: 131.30282805081365200932910478232
    ke: 0.6
    pwm: 00:05:00

If for example I tried to change the limits of the second one this way:

service: smart_thermostat.set_preset_temp
data:
  away_temp: 10
target:
  entity_id: climate.smart_thermostat_sous_sol

I get this error:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/websocket_api/connection.py:141
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 22:45:28 (1 occurrences)
Last logged: 22:45:28

[140471625016224] Error handling message: value must be at least 18.0 for dictionary value @ data['away_temp']. Got None

10 is supposed to be in the accepted range of the second one but he give a value of 18 which is the lower limit of the first one.

Adorem commented 2 years ago

Merci ça fonctionne !