-
-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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 tado climate swings and fan level #117378
base: dev
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
Hey there @chiefdragon, @erwindouna, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
@@ -81,7 +81,7 @@ async def test_smartac_with_swing(hass: HomeAssistant) -> None: | |||
"min_temp": 16.0, | |||
"preset_mode": "auto", | |||
"preset_modes": ["away", "home", "auto"], | |||
"swing_modes": ["on", "off"], | |||
"swing_modes": ["off", "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.
Why is this order reversed and what does it do?
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's because I changed the order of insertion in swing_modes.
I can reverse it. My bad.
if self.supported_features & ClimateEntityFeature.SWING_MODE: | ||
swing = self._current_tado_swing_mode | ||
if self._attr_swing_modes is not None: |
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 we reduce the nesting here? Can an early-return principle be used here?
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.
Yes you're right. I think I can merge it in a single if.
I don't think I can use a return because I don't want to skip the call to set_zone_overlay for that reason.
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.
Feel free to let me know when you committed these changes and I need to review them again.
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's okay. Let me know if you want some other changes.
No idea how I broke that test. |
This test is also broken on the dev branch. So, I don't know how to fix it. |
Breaking change
Proposed change
Fix tado integration to handle fanLevel, verticalSwing and horizontalSwing
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: