Use dedicated power commands for LG infrared#168488
Conversation
|
Hey there @home-assistant/core, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
Pull request overview
This PR updates the LG Infrared media player to use discrete power on/off IR commands instead of a power toggle, aligning service behavior with explicit on/off intent.
Changes:
- Switch
async_turn_onto sendLGTVCode.POWER_ONinstead ofLGTVCode.POWER. - Switch
async_turn_offto sendLGTVCode.POWER_OFFinstead ofLGTVCode.POWER.
|
@copilot fix test |
Agent-Logs-Url: https://github.com/home-assistant/core/sessions/e607588a-c17f-431f-809b-06753007a0ab Co-authored-by: balloob <1444314+balloob@users.noreply.github.com>
Fixed in |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: balloob <1444314+balloob@users.noreply.github.com>
abmantis
left a comment
There was a problem hiding this comment.
This now always sends turn_off, since the interface only shows 1 button, right?
The UI should show separate On/Off buttons when assumed_state = True.
Alternatively, we could toggle _attr_state in turn_on() and turn_off(), but that is a worse UX than just sending POWER all the times instead.
|
Yeah, we do this for light already. We should do this in the frontend too for media player turn on/off buttons. |
Breaking change
Proposed change
It was using the power toggle command instead of dedicated power on/off commands.
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: