Automation when door opens

Hi,

I would like to see if its possible to setup an automation to trigger when the door is open and the amplifier is switched on. If this condition is met then i must set the amplifier volume level in a variable and then set the volume to -70dbm. Then when the door is closed again the volume should be restored to its previous volume level which was stored in the variable.

Any ideas how i can go about it.

Thanks,
Et

You probably can have the following actions triggered when your door opens:

  1. create a scene on the fly to store the current stade of your media player.
  2. Set the volume to certain level
  3. Wait for a trigger (door closing)
  4. Restore the scene saved