I have created two automations
-
One is turning two devices on (2x Power Plugs connected to Sony SRS-XB501G) and
-
the other that torning four devices off. (2x Power Plug and additionally the 2x Sony SRS-XB501G)
This is needed because The Sony Devices have Batteries, if i only turn off the plugs, the devices just stay on. Also it is not possible to remote turn on the Sony Boxes via Command. But with the Work around to plug them in with power, they will turn on automatically and search for the Wifi.
My problem is now, i want a create a entity switch that runs, depending on the state each automations.
I have acheived to create a button, to run the automation, but with that i need two seperate and i cant see what is the state of the devices in one entity. can you help me to to achive this?
Here is the example what i have aceived so far:
entities:
- entity: light.rooflamp
- entity: switch.printer_epson
- entity: automation.srs_xb501g_off
name: Turn off Boxes
show_state: false
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.srs_xb501g_off
type: button
- entity: automation.srs_xb501g_on
- entity: light.pwr_right
- entity: light.pwr_left
show_header_toggle: false
title: Livingroom
type: entities