Skip to content

Key sensors for HomeKit Remotes#35421

Closed
bdraco wants to merge 1 commit intohome-assistant:devfrom
bdraco:homekit_remote_key_sensor
Closed

Key sensors for HomeKit Remotes#35421
bdraco wants to merge 1 commit intohome-assistant:devfrom
bdraco:homekit_remote_key_sensor

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented May 9, 2020

The following PRs (in order) should be reviewed before this one as they make changes that will cause conflicts with this PR.

#35299
#35147
#35100
#35384

Proposed change

Key sensors for HomeKit Remotes. This allows remote key pressed in homekit to be seen on the sensors so they can be mapped via automations. Previous approaches were to use custom events. Now that multiple tv media players can exist it means multiple virtual remotes can exist as well. A sensor per remote seemed like a good way to avoid confusion. Will likely add device triggers in a followup.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

@joogps
Copy link
Copy Markdown
Contributor

joogps commented May 9, 2020

Maybe after one of these approaches is approved and merged we could create a repository with pre-made template automations that fit each one of the media_player (or remote) integrations properly to make setup easier

@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented May 9, 2020

Will need to fix the entry_id -> entry in the test but its going to conflict heavily with the above listed PRs so not much point in doing it now

Comment thread homeassistant/components/homekit/sensor.py
@bdraco bdraco closed this May 9, 2020
@bdraco
Copy link
Copy Markdown
Member Author

bdraco commented May 9, 2020

@joogps Seems like there is a clear path forward on this now which is similar to #29588 if you want to revive your original PR. This is also needs to include an identifier (maybe self.entity_id) since multiple tv media players can exist now.

@joogps
Copy link
Copy Markdown
Contributor

joogps commented May 9, 2020

I also believe that the simplest solution is firing events. I thought that #29588 already included the entity ID of the TV as one of the event parameters

@lock lock Bot locked and limited conversation to collaborators May 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants