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

Add generic command functionality to denonavr #29295

Merged
merged 9 commits into from
Jan 2, 2020

Conversation

bendavid
Copy link
Contributor

@bendavid bendavid commented Dec 1, 2019

Description:

Adds generic http get command functionality to denonavr

Replaces #28280 since the discussion in home-assistant/architecture#299 seems to disfavour adding generic command functionality to the media_player domain.

Example entry for configuration.yaml (if applicable):

automation:
- alias: Harmony Mute Button
  trigger:
    platform: event
    event_type: keyboard_remote_command_received
    event_data:
      key_code: 113
  action:
  - service: denonavr.get_command
    data:
      entity_id: media_player.denon_avr
      command: "/goform/formiPhoneAppDirect.xml?RCKSK0410370"

Corresponding documentation update in home-assistant/home-assistant.io#11598

@springstan
Copy link
Member

@bendavid could you please add tests to make sure that your code works as intended?
Thank you :)

@bendavid
Copy link
Contributor Author

Have added at least a minimal unit test that covers the new functionality. (there was no unit test for this integration previously).

tests/components/denonavr/test_media_player.py Outdated Show resolved Hide resolved
tests/components/denonavr/test_media_player.py Outdated Show resolved Hide resolved
homeassistant/components/denonavr/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/denonavr/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/denonavr/__init__.py Outdated Show resolved Hide resolved
homeassistant/components/denonavr/media_player.py Outdated Show resolved Hide resolved
Dev automation moved this from Needs review to Review in progress Dec 29, 2019
tests/components/denonavr/test_media_player.py Outdated Show resolved Hide resolved
tests/components/denonavr/test_media_player.py Outdated Show resolved Hide resolved
tests/components/denonavr/test_media_player.py Outdated Show resolved Hide resolved
tests/components/denonavr/test_media_player.py Outdated Show resolved Hide resolved
Dev automation moved this from Review in progress to Reviewer approved Jan 2, 2020
Copy link
Member

@MartinHjelmare MartinHjelmare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@MartinHjelmare
Copy link
Member

Can be merged when build passes.

@springstan springstan merged commit 9064058 into home-assistant:dev Jan 2, 2020
Dev automation moved this from Reviewer approved to Done Jan 2, 2020
@lock lock bot locked and limited conversation to collaborators Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

4 participants