Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] - save last state in off state, so toggling after restart picks up last settings #245

Open
jacobw opened this issue Jul 23, 2024 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@jacobw
Copy link

jacobw commented Jul 23, 2024

If I restart HA while the climate control is on, it correctly continues as it was before the restart. However, if it's off, it forgets the recent state and I have to manually set it again, instead if just being able to toggle it back on again. This also means I lose the previous temp setting.

Is it possible to save and restore state when of too?

E.g, before restart, last setting was heating with target 20.5. After restart if I toggle on, it goes back to cooling target 19, and I have to go and configure again. This happens fairly regularly due to many updates requiring restarts.

@swingerman
Copy link
Owner

swingerman commented Jul 23, 2024

Could you confirm the current version you use and your current configuration?

@swingerman swingerman self-assigned this Jul 23, 2024
@jacobw
Copy link
Author

jacobw commented Jul 23, 2024

v0.9.7 (though this has been an issue for a while)

I've been trying different things to resolve this issue so a few bits commented out while I've been testing.

  - platform: dual_smart_thermostat
    name: Main Bedroom Climate
    unique_id: main_bedroom_climate
    heater: switch.main_bedroom_heatpump_heat
    cooler: switch.main_bedroom_heatpump_cool
    target_sensor: sensor.yz_e871_temperature
    # heat_cool_mode: true
    min_temp: 15
    max_temp: 26
    target_temp: 19.5
    # target_temp_high: 21
    # target_temp_low: 19
    cold_tolerance: 0.5
    hot_tolerance: 0
    precision: 0.1
    target_temp_step: 0.5

@swingerman
Copy link
Owner

Thanks. I will look into this.

@swingerman swingerman added the enhancement New feature or request label Jul 24, 2024
@cyberkryten
Copy link

I'm not sure if it is related (or helpful) but hvac_action_reason doesn't get set to anything at all after a restart until the thermostat takes some 'action' again.

So if it was target_temp_reached and you restart (or reload the YAML from Developer tools) then it remains as an empty attribute until something gets changed and causes an action to occur that would change it.

I've been trying to use it to determine if an AC has been turned off by the integration or manually from a control panel and the 'blank' value has caused some issues with the logic

@jacobw
Copy link
Author

jacobw commented Aug 2, 2024

Yeah it's never set every time I check it too. Right now it's active and idle because it just hit target but doesn't say that. Eg

hvac_modes:

  • heat
  • "off"
  • cool
  • heat_cool
    min_temp: 15
    max_temp: 26
    target_temp_step: 0.5
    current_temperature: 21.8
    temperature: 21
    hvac_action: idle
    prev_target_temp_low: 21
    prev_target_temp_high: 21
    prev_target_temp: 21
    hvac_action_reason: ""
    friendly_name: M Climate
    supported_features: 385

@swingerman swingerman pinned this issue Aug 11, 2024
@swingerman swingerman changed the title State not saving through restart if climate control off [feat] - Save last state in off state, so toogglimg after restart picks up last settings Aug 11, 2024
@swingerman swingerman changed the title [feat] - Save last state in off state, so toogglimg after restart picks up last settings [feat] - save last state in off state, so toogglimg after restart picks up last settings Aug 11, 2024
@swingerman swingerman changed the title [feat] - save last state in off state, so toogglimg after restart picks up last settings [feat] - save last state in off state, so toggling after restart picks up last settings Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants