-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
Add overkiz support for Atlantic Shogun ZoneControl 2.0 (AtlanticPassAPCHeatingAndCoolingZone) #110510
Add overkiz support for Atlantic Shogun ZoneControl 2.0 (AtlanticPassAPCHeatingAndCoolingZone) #110510
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Tronix117
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
Hey there @iMicknl, @vlebourl, @tetienne, @nyroDev, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
5bec218
to
2bafaeb
Compare
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_heating_zone.py
Show resolved
Hide resolved
2bafaeb
to
8e3adad
Compare
8e3adad
to
9ab51d4
Compare
@Tronix117 Thanks for your first PR here! This PR is breaking everything on my setup regarding the device you're updating. Before I had Preset Eco, comfort, away, antifrost, externe, home, When I try to set to manual, I have error:
Min/max available temperarture was also set up directly in the code, because AFAIK it was done that way in tahoma code too. If I understand correctly, you're trying to fix a problem for a specific device, which seem to fall under the same widget name than me (and the one that is currenlty working on HA) If the diagnostic you're trying to fix is the one posted here, I think we have to choose the correct device class using On my case, it's In other words, it means we have to something like |
Ok thanks for your feedback. That's weird because I first check if you support the missing command for the device I'm trying to fix (the one used to set the temperature on your device), if it's the case I fallback to the previous behavior. Obviously it seems that I introduced a mistake somewhere, I'll check that next week. Edit: I know what the issue is, it's from the initialized attributes, I need to do them in the init function. The initial code is also not perfect for your device that is reversible (to cooling) if the thermostat is changed. I'll try to do something for that too (but in a separated PR) |
3098c75
to
2302527
Compare
@nyroDev You were right about However I still kept (and also fix the issue you had), the check I do on the Not sure if I shall still keep it, since it increase complexity a bit... Could you please @nyroDev check if the new changes I made, is working perfectly (like before) for you ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for spending your time on this! These devices are very complex, and would be good to support them all in a better way.
Didn't had time yet to deep dive in your code, but will try to do that somewhere next week. Let me know when the PR is fully tested and ready for review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small changes
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py
Outdated
Show resolved
Hide resolved
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py
Outdated
Show resolved
Hide resolved
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py
Outdated
Show resolved
Hide resolved
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py
Outdated
Show resolved
Hide resolved
...components/overkiz/climate_entities/atlantic_pass_apc_heating_and_cooling_controlled_zone.py
Outdated
Show resolved
Hide resolved
The current code works as before for me, thanks for that ;) |
Thanks for the review, it seems pretty good, strings instead of constants are there because there is an issue with the CI on the other repo preventing the pyoverkiz release (@iMicknl could you take a look ?) |
@Tronix117 what do you mean? The latest pyoverkiz has been published a few days ago and should include your changes. |
ffb7649
to
5ef8078
Compare
251e27b
to
9c014ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some quick comments.
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control_zone.py
Outdated
Show resolved
Hide resolved
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control_zone.py
Outdated
Show resolved
Hide resolved
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control_zone.py
Show resolved
Hide resolved
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control.py
Show resolved
Hide resolved
homeassistant/components/overkiz/climate_entities/atlantic_pass_apc_zone_control_zone.py
Outdated
Show resolved
Hide resolved
fb1634c
to
870dda1
Compare
870dda1
to
a315e05
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! (and tested by multiple users). Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address the comments in a new PR. Thanks!
@@ -28,6 +32,18 @@ async def async_setup_entry( | |||
if device.widget in WIDGET_TO_CLIMATE_ENTITY | |||
) | |||
|
|||
# Match devices based on the widget and controllableName | |||
# This is for example used for Atlantic APC, where devices with different functionality share the same uiClass and widget. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please break long comments around max 88 characters per line.
@@ -28,6 +32,18 @@ async def async_setup_entry( | |||
if device.widget in WIDGET_TO_CLIMATE_ENTITY | |||
) | |||
|
|||
# Match devices based on the widget and controllableName | |||
# This is for example used for Atlantic APC, where devices with different functionality share the same uiClass and widget. | |||
async_add_entities( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please collect all entities and make a single call to async_add_entities
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'll be better indeed, I'll refactor that.
Initialy, I didn't do it, because there was already two calls, so I was not sure if it was my call to change that or not.
|
||
# It helps keep it consistent with the Zone Control, within the interface. | ||
if self._attr_hvac_modes != [zone_control_hvac_mode, HVACMode.OFF]: | ||
self._attr_hvac_modes = [zone_control_hvac_mode, HVACMode.OFF] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the hvac modes during the entity lifetime is weird.
Regardless, there shouldn't be side effects in entity state properties. If another attribute needs to change it should be done in a state update callback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MartinHjelmare yes it's as weird as those devices can be...
The thing is, none of those subsidiary devices can control the current mode that is given by the parent ZoneControl device. There only choices are On or Stop.
Maybe the best choice is to always use HEAT_COOL + OFF for those subsidiary devices.
I made the #111830 PR, for now I only use HEAT_COOL for AUTO, but I can always use it instead. It's just not this relevant to change cooling temperature when ZoneControl mode is forced to Heating.
Do you have any advice or tip ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note: The auto mode should be used only if the temperature can't be controlled by the user.
Why not only have on/off as mode for the simple devices?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MartinHjelmare
A little bit more context:
- the main control device (ZoneControl), have no temperature control, but mode selection: Auto, Heating, Cooling, Drying, Off
- the zones (ZoneControlZone), does not control the mode, but control the temperature (have different cooling and heating temperature).
Also from this doc : https://developers.home-assistant.io/docs/core/entity/climate/ there is no ON possibility, and to set temperature on a per zone basis, it needs to be one of the other mode.
But I think using [HvacMode.HEAT_COOL, HVACMode.Off]
(for any mode on the main ZoneControl device), will be the best call here.
# It helps keep it consistent with the Zone Control, within the interface. | ||
if self._attr_hvac_modes != [zone_control_hvac_mode, HVACMode.OFF]: | ||
self._attr_hvac_modes = [zone_control_hvac_mode, HVACMode.OFF] | ||
self.async_write_ha_state() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I remove that, it seems the changes I make on _attr_hvac_modes are not instantaneous on the interface...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There needs to be a callback method that is called by the thing that initiates the state update. That callback should make all needed changes to attributes and then call self.async_write_ha_state
.
…APCHeatingAndCoolingZone) (#110510) * Add Overkiz support for AtlanticPassAPCHeatingAndCoolingZone widget * Add support for AUTO HVAC mode for Atlantic Pass APC ZC devices that support it * Add support for multiple IO controllers for same widget (mainly for Atlantic APC) * Implement PR feedback * Small PR fixes * Fix constant inversion typo
Proposed change
There was a previous implementation of the widget
AtlanticPassAPCHeatingAndCoolingZone
, but it was lacking cooling features, and was only reusingAtlanticPassAPCHeatingZone
logic.There was a lack of support for the devices not supporting the
setDerogatedTargetTemperature
command (see #89746).This PR handles that, it is mainly a fix for the Atlantic Shogun Zone Control 2.0, but could work for other devices.
As of right now, I only found one other device using the same widget : Atlantic Alféa Extensa Duo (see discussion here : iMicknl/ha-tahoma#381), for this device the behavior will stay the same as before (good or bad as it is).
Here what can be done :
OFF
does not really stop de HVAC, but stop the airflow to the specific zone (= STOP on the zone thermostat)HEAT
orCOOL
orDRYING
, the only other available mode for the zone, will be the currently active mode on the main ZoneControl unitManual
: allow to set temperatureInternal_Schedule
: will follow comfort/eco rules set internaly on the main ZoneControl unit, temperature change is ignored on this modeIn addition Auto HVAC mode has been added, when the Atlantic Pass APC device can be configured with.
Here what may be done in a future PR :
internal_schedule
preset info is lost, so that when we selectinternal_schedule
, it will immediately goes toComfort
orEco
, maybe aSchedule Comfort
andSchedule Eco
preset could be added instead to solve the issueSee #89746 for more informations about these changes.
For other devices, that support the
setDerogatedTargetTemperature
command, the behavior has not been changed and it will fallback to theAtlanticPassAPCHeatingZone
like before (so no breaking changes).Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: