-
-
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
KNX: Migrate climate component to new climate platform #24931
KNX: Migrate climate component to new climate platform #24931
Conversation
Hey there @Julius2342, 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. |
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.
🎉
self.device.mode.operation_modes] | ||
|
||
if self.device.supports_on_off: | ||
_operations[HVAC_MODE_HEAT] = HVAC_MODE_HEAT |
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.
_operations
is a list, right? What do we want to do 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.
Thanks, fixed in https://github.com/home-assistant/home-assistant/pull/24942/files
_operations[HVAC_MODE_HEAT] = HVAC_MODE_HEAT | ||
_operations[HVAC_MODE_OFF] = HVAC_MODE_OFF | ||
|
||
return list(filter(None, _operations)) |
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.
We prefer list comprehension without using filter.
return [op for op in _operations if op 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.
Breaking Change:
Migrate knx climate component to new climate platform.
Description:
I tried to follow the PR description as much as possible.
Checklist:
tox
. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
python3 -m script.hassfest
.requirements_all.txt
by runningpython3 -m script.gen_requirements_all
..coveragerc
.If the code does not interact with devices: