I am trying to setup a switch and a light (all virtual, no real device) to use in a picture elements card. I want a button to click that then shows the overlay on the image. I have this for my opensprinkler but can not seem to get it to work for the light. My switch code in my config file is
led_flower_1_table_1:
unique_id: rpicputemp1
turn_on:
service: light.turn_on
entity_id: light.flower_1_row_1_lights
turn_off:
service: light.turn_off
entity_id: light.flower_1_row_1_lights
My light code in my config file is
light:
- platform: template
lights:
flower_1_row_1_lights:
unique_id: rpicputemp2
friendly_name: flower_1_row_1_lights
turn_on:
service: light.turn_on
turn_off:
service: light.turn_off
I receive no issues when I reboot HA so it thinks the code is correct. My picture elements code is
- entity: switch.led_flower_1_table_1
title: Flower 1 Table 1 lighting
hold_action:
action: more-info
tap_action:
action: toggle
image: /local/lovelace/icon/3DGrowRmWaterOffIcon.png
state_filter:
'off': brightness(80%) saturate(0.8)
'on': brightness(130% saturate(1.5)
state_image:
'on': /local/lovelace/icon/3DGrowRmWaterOnIcon.png
style:
top: 11%
left: 31.3%
width: 6%
z-index: 1
type: image
- entity: light.flower_1_row_1_lights
title: Table 1
tap_action:
action: none
hold_action:
action: none
image: /local/lovelace/overlay/3DGrowRm1x1.png
state_image:
'on': /local/lovelace/overlay/3DGrowRm2TB1LightsNew.png
style:
left: 50%
top: 50%
width: 100%
opacity: 1
type: image
When I click on the button, it states “Failed to call service switch/turn_on. must contain at least one of entry_id, device_id, or area_id”
I have not changed the button icon file name. Thats why it says 3DGrowRmWaterOffIcon.png lol
Any help is appreciated.