simple-thermostat icon indicating copy to clipboard operation
simple-thermostat copied to clipboard

Temperature adjustment follow by change in preset mode

Open baunan opened this issue 2 years ago • 0 comments

Describe the bug Changing/adjusting the temperature in my case on 'Away' mode/preset. After final temperature adjustement, the preset mode is immediately changed to 'Home', the temperature is then changed on this mode instead of the intended preset mode (Away).

To Reproduce I have a very simple setup on my thermostat with only Home and away preset mode. When changing the temperature, it takes a moment after the last adjustment until the value is recorded.

  1. In 'Away' mode change the temperature to 12 degc. After the final adjustment change directly to 'Home'.
  2. The value of 12 is then recorded on 'Home'. In my case I had 22.5degC and it was changed to 12 as I changed to Home before the temperatuer was recorded on 'Away'.

Expected behavior As I changed the temperature on a different preset mode, then I don't expect it to change temperature on a different preset mode. So 1. Don't allow preset mode to be changed before temperature is recorded. 2. If preset mode is changed, then record the temperature for that mode and not for the preset mode it was changed to. 3. If the preset mode is changed before temperature is recorded, then cancel the temperature change.

# The least ammount of code possible to reproduce my error
  - platform: generic_thermostat
    name: Varmekabler kjøkken
    heater: switch.microtemp_switch_kjokken
    target_sensor: sensor.temperatur_kjokken
    min_temp: 5
    max_temp: 25
    ac_mode: false
    target_temp: 22.5
    cold_tolerance: 0.1
    hot_tolerance: 0
    min_cycle_duration:
      seconds: 60
#    keep_alive:
#      minutes: 60
    initial_hvac_mode: "off"
    away_temp: 12
    precision: 0.1 

type: custom:simple-thermostat
entity: climate.varmekabler_kjokken
header:
  name: Kjøkken
layout:
  mode:
    headings: false
control:
  _headings: false
  preset:
    away:
      icon: mdi:logout
    none:
      icon: mdi:home
      name: Hjemme
hide:
  state: true
  temperature: true
label:
  state: Modus
  temperature: Temperatur
sensors:
  - entity: sensor.temperatur_kjokken
    icon: mdi:home-thermometer-outline
    name: Temperatur
step_size: '0.5'

Screenshots image image image

Browser

  • OS: Proxmox VM
  • Browser: Chrome
  • Simple Thermostat version from browser console: 2.4.3
  • Home Assistant version: 2022.9.7

baunan avatar Nov 16 '22 18:11 baunan