ScratMan / HASmartThermostat

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

climate.set_preset_mode forces preset mode to Away #60

Closed ejalal closed 2 years ago

ejalal commented 2 years ago

Describe the bug climate.set_preset_mode forces preset mode to Away of I call it with preset_mode: "none" since release 2021.12.5

To Reproduce Steps to reproduce the behavior:

  1. From HA Dev Tools
  2. Call climate.set_preset_mode with preset mode
    service: climate.set_preset_mode
    data: 
    preset_mode: "none"
    entity_id: "all"
  3. Thermostat is set to Away mode.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Reverted to 2021.12.4 and correct behavior was restored

ScratMan commented 2 years ago

Hello, there is a new functionality introduced in 2021.12.5, that syncs the presets with the temperature setting. If for example your away preset temperature is set to 15°C and you manually change the temperature to 15°C, the away preset will be automatically selected. Setting the preset to none reverts the temperature to the selected value before setting a preset, so it means your temperature was set to the same as the away temperature.

ScratMan commented 2 years ago

Behavior can now be selected in v2021.12.6 using optional preset_sync_mode parameter (default to 'none' like in v2021.12.4).