Hello, Yaml Novice and Home Assistant Novice Here. I am trying to make a custom button card to turn off and turn on my pc. I have to use 2 different entities (a toggle switch to turn on the pc, and a binary sensor that pings the pc to know if it is on or not), Not sure how the code should go.
Basic Stuff:
Entity 1 is the switch that turns the PC on and off (just a momentary switch)
switch.sonoff_1001297fb9
Entity 2 is the binary sensor
binary_sensor.barry_s_gaming_desktop_ethernet_ping
I would like to use the Icon mdi:power, and use grey for off, and green for on.
BBCode
type: custom:button-card
entity: binary_sensor.barry_s_gaming_desktop_ethernet_ping
name: Ready Player One
icon: mdi:power
tap_action:
entity: switch.sonoff_1001297fb9