lukasroegner / homebridge-apple-tv-remote

Plugin for controlling Apple TVs in homebridge.
MIT License
132 stars 13 forks source link

[Feature Request] Play/Pause switch to include "stopped" status #57

Closed Carl05M closed 4 years ago

Carl05M commented 4 years ago

Hi Lukas,

This is a great plugin - thank you for your efforts.

I've activated the play/pause switch to automate lights when media is being played on my AppleTV. It works exactly as described - the status changes with play/pause commands. As the commandSwitches are "stateless", I'm wondering if it possible to include a status change/switch that establishes when media is stopped or has ended, to allow even greater automation.

Thanks again.

lukasroegner commented 4 years ago

Hi @Carl05M, it would theoretically be possible to subscribe for the stopped event and hand it over to another switch, however, this is a very special use case. The command switches are already very special and technical settings for a Homebridge plugin. Please consider forking the plugin to implement such a feature. Or, maybe, take a look at other automation systems that can be highly customized (e.g. node-red).