Feature zwave preset modes#25537
Conversation
|
Hey there @home-assistant/z-wave, mind taking a look at this pull request as its been labeled with a integration ( This is a automatic comment generated by codeowners-mention to help ensure issues and pull requests are seen by the right people. |
|
I'm afrait that there are many preset modes missing. I've added only the modes that are used by my eurotronic spirit z thermostats. |
|
@Santobert , is the attribute hvac_action still functioning properly for you? I just tried out your new code, and everything seems to be working except that hvac_action keeps showing up as the default value of "None". I've been using this template to see the state: {{ state_attr('climate.downstairs_thermostat_cooling', 'hvac_action') }}. It appeared to be working with the standard/constant hvac_modes in 0.96.5. |
|
@DaveCo1701 Try it again. Should be working now. The tests should be passing now, too. Do you miss any preset modes that should be added to the PRESET_MAPPINGS? |
|
Thank you @Santobert, everything appears to be functioning properly with my setup using the updated code. The only two manufacturer specific modes I am using are the "Cool Econ" and "Heat Econ". Both are now showing up automatically; I don't see a need to add them PRESET_MAPPINGS unless there is a benefit I'm unaware of. |
|
@DaveCo1701 Awesome |
|
The current solution should work. There is a default hvac mode that is generated out of a sorted list and the supported hvac modes. This is necessary because not all devices support HVAC_MODE_HEAT_COOL. Furthermore you can unset a selected preset mode by setting preset to PRESET_NONE, which activates the default hvac mode. Hope, I missed nothing :) @DaveCo1701 can you please test the latest changes one last time? |
|
Just to chime in on the Zwave part of it: For the actuall running state of the thermostat there is a seperate command class called ThermostatOperatingState. Many thermostats only provides the ThermostatMode commandclass and not the ThermostatOperatingState at the same time. This is what's causing the misunderstandings of this. |
|
@turbokongen Thank you for explanation. I try to explain my current understanding of all these states:
Am I right? |
This is my understanding as well. |
@Santobert , I like the idea you've setup, but it doesn't seem to be switching modes as intended. When selecting an HVAC_MODE, everything works fine. When selecting a preset mode (Heat Econ or Cool Econ in my case), the corresponding HVAC_MODE (Heat or Cool in my case) isn't selected. The thermostat will move to the Heat Econ Mode or Cool Econ Mode, but when PRESET_NONE is selected, it doesn't do anything. The thermostat does not change state and eventually HA shows the previous setting. See attached screenshot videos for how my two thermostats are behaving (Upstairs doesn't have Heat/Cool Mode Enabled, Downstairs has Heat/Cool Mode Enabled). |
@DaveCo1701 Thank you. I've made a stupid mistake. Now it works |
|
@Santobert , just tested again this morning. Selecting PRESET_NONE will change the thermostat over to the listed HVAC_MODE; looks like that is fixed. When I go to COOL ECON on my thermostat that doesn't have HEAT/COOL, the HVAC_MODE goes to HEAT. When I change the PRESET from COOL ECON to NONE, it switches me into HVAC_MODE HEAT. Is this the expected behavior? |
|
@DaveCo1701 I've assumed there are no devices that are able to cool and to heat but don't support HVAC_MODE_HEAT_COOL. So when Heat/Cool isn't supported I choose the first supported mode out of a sorted list. This list contains HEAT before COOL. I'll think about a solution... |
|
@DaveCo1701 Should be fixed now. When selecting PRESET_NONE the device should jump to the currently show hvac mode. The currently shown hvac mode is either HVAC_MODE_HEAT if the device supports this and the substring heat is in the selected preset mode, or HVAC_MODE_COOL under the same circumstances. If neither Heat nor Cool matches, it shows the _default_hvac_mode that is selected from the list mentioned above. |
@Santobert , just tried your updates, it's still functioning the same as it did last night (same as the videos I uploaded) |
Yeah, I should definitely be more awake when I fix bugs. 😒 |
|
Let run that on beta 👍 good work |
|
@DaveCo1701 Please test this one last time. It should (hopefully) work now. I've added some debugger logs, which should help us, finding possible errors. |
|
Works great now! Thanks @Santobert |

Breaking Change:
Nothing
Description:
Adds preset modes to the zwave climate integration.
There was an previous PR #25517 that had to be closed because of issues with the CI.
Related issue (if applicable): fixes #25322
Pull request with documentation for home-assistant.io (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
The documentation can stay unchanged
Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code does not interact with devices: