mattsaxon / HASS-SpeakercraftMediaPlayer

Speakercraft Platform for Home Assistant
4 stars 1 forks source link

Refine approach for Master-On controlling a smart plug for amplifier power #18

Closed mattsaxon closed 2 years ago

mattsaxon commented 2 years ago

@sjeffrey101 suggested;

mattsaxon commented 2 years ago

Discussions in #25 suggest we may keep this functionality.

sjeffrey101 commented 2 years ago

this has now been resolved.

a new class, for the controller has been created, which has a callback for when the first zone is requested power or the last zone is turned off.

on the ha side there is a power handler class which then responds to the call back and turned the smart plug on/off.

there is a delay of 60 seconds to turn off so its not turning the mains power on/off repeatedly.