-
-
Notifications
You must be signed in to change notification settings - Fork 31
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 device AtlanticPassAPCHeatingZone #785
add device AtlanticPassAPCHeatingZone #785
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.
Thanks @jgarec! Appreciated :).
Since you mention WIP in the title, I marked your PR as a draft for now, so it won't accidentally get merged before you are finished.
This component is concerned by #167 |
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
CUSTOM_PRESET_AUTO = "Auto" | ||
CUSTOM_PRESET_STOP = "Stop" | ||
|
||
COMMAND_REFRESH_COMFORT_HEATING_TARGET_TEMPERATURE = ( |
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.
Can you please add all these states and commands to https://github.com/iMicknl/python-overkiz-api/tree/main/pyoverkiz/enums ?
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.
Should i also add commands / states not used in this class ?
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.
Only add the ones you need
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Show resolved
Hide resolved
da6fb8d
to
0336ac9
Compare
_attr_max_temp = 30 | ||
_attr_min_temp = 5 |
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.
These values are not exposed by Atlantic?
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.
not in this device (device number 7)
the navilink sensor (device number 8) have 2 attributes (from 5 to 30) :
2022-02-20 21:24:28 DEBUG (MainThread) [custom_components.tahoma] Unsupported device detected (Device(attributes=States(_states=[.... State(name='core:MaxSensedValue', type=<DataType.FLOAT: 2>, value=30.0), State(name='core:MinSensedValue', type=<DataType.FLOAT: 2>, value=5.0)]),available=True, enabled=True, label=** *(**#**)*, device_url=io://****-****-0589/12309249#8, controllable_name='io:AtlanticPassAPCZoneTemperatureSensor' ....
tahomalink allows to set a temperature between 7 and 35 ...
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.
🤡 And what happens if you set 35? It's applied?
If the values are returned as you Show me, you can retrieve them into the init method using the linked device.
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
if self.preset_mode == PRESET_COMFORT: | ||
return self.executor.select_state( | ||
CORE_COMFORT_HEATING_TARGET_TEMPERATURE_STATE | ||
) | ||
if self.preset_mode == PRESET_ECO: | ||
return self.executor.select_state(CORE_ECO_HEATING_TARGET_TEMPERATURE_STATE) | ||
if self.preset_mode == CUSTOM_PRESET_DEROGATION: | ||
return self.executor.select_state(CORE_DEROGATED_TARGET_TEMPERATURE_STATE) | ||
|
||
return self.executor.select_state(CORE_TARGET_TEMPERATURE_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.
Here also you can ease the code with a dict.
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
custom_components/tahoma/climate_devices/atlantic_pass_apc_heating_zone.py
Outdated
Show resolved
Hide resolved
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.
Sorry for the number of comments.
As your code will be backport to the Core, I try to be as strict as they are (fairly).
…ting_zone.py Co-authored-by: Thibaut <[email protected]>
For what do you need this? There is a low chance that this will be implemented. |
If i change a state in HA then i can handle the refresh by myself. But if it's changed outstide then some states are not always refreshed and HA uses old known states |
…ting_zone.py Co-authored-by: Thibaut <[email protected]>
…hub.com/jgarec/ha-tahoma into feat/support_AtlanticPassAPCHeatingZone
…ting_zone.py Co-authored-by: Thibaut <[email protected]>
Makes sense... I will dive into this. Could you add your diagnostics log here? I would love to understand more about your device :). Sorry for the strict reviews, but we would like to have this one ready directly for core as well. Some of our (older) climate implementations still need to be rewritten. |
await self.executor.async_execute_command( | ||
COMMAND_SET_DEROGATION_ON_OFF_STATE, "on" | ||
) |
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.
await self.executor.async_execute_command( | |
COMMAND_SET_DEROGATION_ON_OFF_STATE, "on" | |
) | |
await self.executor.async_execute_command( | |
OverkizCommand.SET_DEROGATION_ON_OFF_STATE, OverkizCommandParam.ON | |
) |
Would be great if you could use our enums here (and in all other executions). See https://github.com/home-assistant/core/blob/dev/homeassistant/components/overkiz/climate_entities/atlantic_electrical_heater.py.
However, many of these enums are probably missing and we need to add them to PyOverkiz.
@jgarec would you still be interested of porting this one to core? We are now moving all climate entities. |
Closes #731