Hyxion14
(Daniel)
May 20, 2024, 2:23pm
1
Hello,
I am configuring this entity with KNX integration:
knx:
climate:
- name: "Suelo Salon"
on_off_address: "1/0/2"
on_off_state_address: "1/0/3"
temperature_address: "1/0/1"
target_temperature_address: "1/0/4"
target_temperature_state_address: "1/0/5"
min_temp: 16.0
max_temp: 30.0
heat_cool_address: "1/0/8"
heat_cool_state_address: "1/0/9"
When I turn on the thermostat, it always turns on in “heat” mode.
But how can I set it to always turn on in the mode it was in when I turned it off?
Thanks
Hyxion14
(Daniel)
May 20, 2024, 2:32pm
2
Yes, I remove from this configuration:
heat_cool_address: “1/0/8”
It works as I want, but I get the error:
Could not call climate/turn_on service. <DeviceIllegalValue description="controller (HVAC) mode not supported" value="HVACControllerMode.HEAT" />
Hyxion14
(Daniel)
May 20, 2024, 3:19pm
3
Hello @farmio ,
should I set some attribute to on_off_address so that when activating the thermostat it does it in the current mode and not always in heat?
Thanks
farmio
(Matthias Alphart)
May 20, 2024, 3:27pm
4
I don’t know what you mean by “some attribute”. You can only assign GAs here.
The correct configuration solely depends on your actuator and its configuration. The entity should use the mode last received on heat_cool_state_address
.
Hyxion14
(Daniel)
May 20, 2024, 3:31pm
5
The problem I have is that the entity does not use the last mode received, it always turns on in heat mode.
Hyxion14
(Daniel)
May 20, 2024, 3:51pm
6
If in KNX I change the mode status to cool, in GA 1/0/9, in HA it changes to cool, but if I turn off the thermostat from HA and turn it on again, it always turns on in heat.
It should turn on in cool mode, shouldn’t it?
farmio
(Matthias Alphart)
May 20, 2024, 5:33pm
7
Yes, I guess. Does the actuator send anything when turned on?
Hyxion14
(Daniel)
May 20, 2024, 5:58pm
8
Yes.
The KNX thermostat is switched on by sending ‘1’ to KNX address 1/0/2 and sends its status to address 1/0/3.
Therefore, the thermostat sends ‘1’ to the KNX bus when switching on.
farmio
(Matthias Alphart)
May 20, 2024, 6:17pm
9
Aha. Does it ever send a 0
to “1/0/9” ?
Hyxion14
(Daniel)
May 20, 2024, 8:20pm
10
Address 1/0/9 is the state of the thermostat mode.
The thermostat periodically sends its mode status to the bus.
Hyxion14
(Daniel)
May 21, 2024, 4:19pm
11
Hello @farmio ,
I have made a diagnostic of the telegrams that are sent to the KNX BUS and the thermostat periodically sends its mode status to the address 1/0/9, but as I was saying, when I turn off the thermostat, it does not turn on in the previous mode.
farmio
(Matthias Alphart)
May 21, 2024, 6:53pm
12
Ah, I see. It’s the new climate.turn_on
service that messes this up.
When you turn it back on from Knx it should work fine, does it?
farmio
(Matthias Alphart)
May 21, 2024, 10:10pm
13
Should be fixed in next release. It would be nice if you could (beta) test it then as I don’t have such controllers in my installation.
home-assistant:dev
← home-assistant:knx-climate-turn-on
opened 09:50PM - 21 May 24 UTC
## Proposed change
<!--
Describe the big picture of your changes here to com… municate to the
maintainers why we should accept this pull request. If it fixes a bug
or resolves a feature request, be sure to link to that issue in the
additional information section.
-->
Add async_turn_on/off methods for KNX climate entities
to avoid setting the wrong mode when turned on via dedicated on/off address. Now either the previous mode is set (if no on/off address is set) or the controllers mode is used (as there is no mode sent but only turn_on signal).
Also `async_set_hvac_mode()` doesn't explicitly turn on now when there is a dedicated on/off address. This should be handled by the actuator - depending on its setting (or the user by using `async_turn_on()`).
## Type of change
<!--
What type of change does your PR introduce to Home Assistant?
NOTE: Please, check only 1! box!
If your PR requires multiple boxes to be checked, you'll most likely need to
split it into multiple PRs. This makes things easier and faster to code review.
-->
- [ ] Dependency upgrade
- [x] Bugfix (non-breaking change which fixes an issue)
- [ ] New integration (thank you!)
- [ ] New feature (which adds functionality to an existing integration)
- [ ] Deprecation (breaking change to happen in the future)
- [ ] Breaking change (fix/feature causing existing functionality to break)
- [ ] Code quality improvements to existing code or addition of tests
## Additional information
<!--
Details are important, and help maintainers processing your PR.
Please be sure to fill out additional details, if applicable.
-->
- This PR fixes or closes issue: fixes #
- This PR is related to issue: https://github.com/home-assistant/core/pull/109138
- Link to documentation pull request:
## Checklist
<!--
Put an `x` in the boxes that apply. You can also fill these out after
creating the PR. If you're unsure about any of them, don't hesitate to ask.
We're here to help! This is simply a reminder of what we are going to look
for before merging your code.
-->
- [x] The code change is tested and works locally.
- [x] Local tests pass. **Your PR cannot be merged unless tests pass**
- [x] There is no commented out code in this PR.
- [x] I have followed the [development checklist][dev-checklist]
- [x] I have followed the [perfect PR recommendations][perfect-pr]
- [x] The code has been formatted using Ruff (`ruff format homeassistant tests`)
- [x] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
- [ ] Documentation added/updated for [www.home-assistant.io][docs-repository]
If the code communicates with devices, web services, or third-party tools:
- [ ] The [manifest file][manifest-docs] has all fields filled out correctly.
Updated and included derived files by running: `python3 -m script.hassfest`.
- [ ] New or updated dependencies have been added to `requirements_all.txt`.
Updated by running `python3 -m script.gen_requirements_all`.
- [ ] For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
- [ ] Untested files have been added to `.coveragerc`.
<!--
This project is very active and we have a high turnover of pull requests.
Unfortunately, the number of incoming pull requests is higher than what our
reviewers can review and merge so there is a long backlog of pull requests
waiting for review. You can help here!
By reviewing another pull request, you will help raise the code quality of
that pull request and the final review will be faster. This way the general
pace of pull request reviews will go up and your wait time will go down.
When picking a pull request to review, try to choose one that hasn't yet
been reviewed.
Thanks for helping out!
-->
To help with the load of incoming pull requests:
- [ ] I have reviewed two other [open pull requests][prs] in this repository.
[prs]: https://github.com/home-assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
<!--
Thank you for contributing <3
Below, some useful links you could explore:
-->
[dev-checklist]: https://developers.home-assistant.io/docs/development_checklist/
[manifest-docs]: https://developers.home-assistant.io/docs/creating_integration_manifest/
[quality-scale]: https://developers.home-assistant.io/docs/integration_quality_scale_index/
[docs-repository]: https://github.com/home-assistant/home-assistant.io
[perfect-pr]: https://developers.home-assistant.io/docs/review-process/#creating-the-perfect-pr
Hyxion14
(Daniel)
May 22, 2024, 5:41am
14
If from KNX it works correctly.
Hyxion14
(Daniel)
May 22, 2024, 5:43am
15
Perfect.
Let me know when the new version is ready and I’ll test it and let you know the result.
Thanks @farmio .
farmio
(Matthias Alphart)
May 22, 2024, 6:09am
16
Beta starts last Wednesday of the month. Release is first Wednesday of the month.
Hyxion14
(Daniel)
May 22, 2024, 6:16am
17
Ok, thank you.
I’ll try it when it’s updated and let you know.
Hyxion14
(Daniel)
June 14, 2024, 10:02am
18
Hello @farmio ,
the changes you made have worked perfectly, now when you turn on the thermostat, it turns on in the last mode it was in.
Thank you very much for your help.
1 Like