I have pulled in our OpenSprinkler system in to HA. I see all of the entities. It brings 3 for each zone. Enabled, Running, & Status. None of these can be turn on to turn the zone on. I have a switch configured in config.yaml to do this.
Code is:
switch:
- platform: template
switches:
os_flower_1_table_1:
value_template: "{{ is_state('binary_sensor.flower_1_table_1_station_running', 'on') }}"
turn_on:
service: opensprinkler.run
data_template:
entity_id: binary_sensor.flower_1_table_1_station_running
# Run seconds uses the input_number below.
run_seconds: "{{ ((states('input_number.station_minutes') | float) * 60) | int }}"
turn_off:
service: opensprinkler.stop
data:
entity_id: binary_sensor.flower_1_table_1_station_running
input_number:
station_minutes:
initial: 1
min: 1
max: 10
step: 1
I want to add a button to the GUI I am building in a Picture Element. I have the code there as:
type: picture-elements
elements:
- entity: switch.os_flower_1_table_1
title: Flower 1 Table 1 Watering
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: 90%
left: 92%
width: 6%
type: image
- entity: switch.os_flower_1_table_1
title: Table 1
tap_action:
action: none
hold_action:
action: none
image: /local/lovelace/overlay/3DGrowRm1x1.png
state_image:
'on': /local/lovelace/overlay/3DGrowRm2TB1.png
style:
left: 90%
top: 70%
width: 100%
opacity: 1
type: image
image: local/lovelace/floorplan/3DGrowRm2.PNG
The icon is there but does not allow me to click on it. It does nothing when I click it. It does not turn into a “click” finger and just stays a pointer. What do I need to change?
Thank you in advance.