esphome / feature-requests

ESPHome Feature Request Tracker
https://esphome.io/
422 stars 27 forks source link

Media player-Allow automations on actions #1772

Open rarroyo6 opened 2 years ago

rarroyo6 commented 2 years ago

Describe the problem you have/What new integration you would like

When a media player action is issued, such as media_player.play, media_player.pause, etc. besides performing the action, be able to perform an automation with it, such as turning on a GPIO pin to switch on an amplifier, or send a signal to switch the source on the receiver. Please describe your use case for this integration and alternatives you've tried:

Right now it works if the ESP is in a self-contained unit, and as long as the speaker is always connected and the amplifier is always on. If the ESP is part of a bigger media player system, there's no way of controlling the system directly from the ESP based on the action. Additional context

The system could maybe be controlled with an automation from HA, but it would be nice if the ESP could be the controller.

rarroyo6 commented 2 years ago

Please disregard this, since the on... trigger was added in 2022.6.2, it can now be used for automations.

Thanks to all.