-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
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 climate's swing mode to LG ThinQ #137619
base: dev
Are you sure you want to change the base?
Add climate's swing mode to LG ThinQ #137619
Conversation
7eb56a1
to
fb3313a
Compare
fb3313a
to
732a8f5
Compare
"swing_mode": { | ||
"state": { | ||
"false": "mdi:arrow-oscillating-off", | ||
"true": "mdi:arrow-oscillating" | ||
} | ||
}, | ||
"swing_horizontal_mode": { | ||
"state": { | ||
"false": "mdi:arrow-oscillating-off", | ||
"true": "mdi:arrow-expand-horizontal" | ||
} |
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.
I am not sure if true
and false
are proper swing modes. What do each mean? Wouldn't it be the case that you have swing_mode
with 3 modes off
, horizontal
and vertical
?
I haven't worked with swing modes a lot, so I might be incorrect, but please let me know what you think
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.
Our device provides on(true) and off(false) functions for horizontal and vertical respectively.
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, but aren't those all 3 swing modes rather than having on and 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.
The API supports on and off respectively, and according to the developer guide, if the horizontal exists separately, the vertical is instructed to be separated. Do you suggest combining the two into one and implementing it with just swing_mode?
if self._device.swing.initialized:
self._attr_supported_features |= ClimateEntityFeature.SWING_MODE
self._attr_swing_modes = [SWING_ON, SWING_OFF]
if self._device.horizontal_swing.initialized:
self._attr_supported_features |= ClimateEntityFeature.SWING_HORIZONTAL_MODE
self._attr_swing_horizontal_modes = [SWING_ON, SWING_OFF]
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
Proposed change
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
.To help with the load of incoming pull requests: