STYJ02YM card LED

23 August 2020

Views: 111

- type: state-icon
entity: sensor.vacuum_led
style:
'--paper-item-icon-color': '#e6e7e9'
'--paper-item-icon-active-color': 'red'
left: 30%
top: 95%
tap_action:
action: call-service
service: automation.trigger
service_data:
entity_id: automation.led_status

Automation.yaml

- id: vacuum_led_switch
alias: led status
trigger:
- entity_id: vacuum.zyzio
platform: state
action:
- service_template: "{% if states.vacuum.zyzio.attributes.repeat_state == 0 %}

script.vacuum_set_light_on
{% elif states.vacuum.zyzio.attributes.repeat_state
== 1 %}
script.vacuum_set_light_off
{% else %}{% endif %}
"
- data: {}
entity_id: automation.led_status
service: automation.turn_off
initial_state: false

Share