home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.06k stars 29.73k forks source link

evohome preset can't be set back to auto #115979

Closed johnl closed 1 week ago

johnl commented 4 months ago

The problem

According to the entity attributes, evohome supports 4 presets when exposed as a "climate" entity

preset_modes: eco, away, home, Custom

by default preset_mode is set to null which means follow the schedule - technically this is a 5th preset. Putting it into one of the other presets, such as away works as intended, but then it's impossible to put it back into null. You can switch to any other preset but can't go back to null (which is different to the other presets)

image

trying to use climate.set_preset_mode call with null or an empty string results in an error message:

This service requires field preset_mode, please enter a valid value for preset_mode

However, I can use a evohome.set_system_mode call to set it back to Auto (which gets preset_mode back to null):

image

Looking at the code, it seems as if it's translating preset_mode to the various evohome system modes, but just doesn't support the default Auto mode:

https://github.com/home-assistant/core/blob/dev/homeassistant/components/evohome/climate.py#L77-L83

I also see that preset "Home" is translated to "Day off" mode in evohome - this hints that maybe there was some confusion here as "Home" seems like the opposite of "Away" but really, for evohome, that is actually "Auto", and "Day off" means , follow Saturday's schedule (like you have a day off of work as if it's a weekend day!)

What version of Home Assistant Core has the issue?

core-2024.4.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

evohome

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 4 months ago

Hey there @zxdavb, mind taking a look at this issue as it has been labeled with an integration (evohome) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `evohome` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign evohome` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


evohome documentation evohome source (message by IssueLinks)

zxdavb commented 3 months ago

by default preset_mode is set to null which means follow the schedule

The above statement is misleading: you are referring to a TCS, but only zones (and DHW) have schedules. They may have their setpoints FollowSchedule, or be in one of the override modes (TemporaryOverride, PermanentOverride).

A preset_mode of null (in JSON, or None in Python) simply says: 'the TCS will let the zones do their thing' (their 'thing' may not be FollowSchedule).

The two-tier scheme used by evohome (TCS and Zone) does not map cleanly to most climate control schemas (e.g. HA, HomeKi, Google Home, etc.) - although almost all support Away mode.

zxdavb commented 3 months ago

Nonetheless, I agree it is a bug.

issue-triage-workflows[bot] commented 2 weeks ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.