Skip to content
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

Apple TV: Use replacement commands for deprecated ones #102056

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Changed coding style as suggested by the code-review
Co-authored-by: Robert Resch <robert@resch.dev>
  • Loading branch information
amitfin and edenhaus authored Oct 25, 2023
commit 3deb66885cd630c75da8b667ce7ff553e20a5dc9
4 changes: 2 additions & 2 deletions homeassistant/components/apple_tv/remote.py
Original file line number Diff line number Diff line change
@@ -71,9 +71,9 @@ async def async_send_command(self, command: Iterable[str], **kwargs: Any) -> Non
for _ in range(num_repeats):
for single_command in command:
attr_value = None
if single_command in COMMAND_TO_ATTRIBUTE:
if attributes := COMMAND_TO_ATTRIBUTE.get(single_command):
attr_value = self.atv
for attr_name in COMMAND_TO_ATTRIBUTE[single_command]:
for attr_name in attributes:
attr_value = getattr(attr_value, attr_name, None)
if not attr_value:
attr_value = getattr(self.atv.remote_control, single_command, None)
Loading