hansen-hasst/packages/mailbox/switch.yaml

19 lines
504 B
YAML
Raw Normal View History

2022-08-12 09:08:44 +00:00
# Example configuration.yaml entry
switch:
- platform: template
switches:
mailbox:
turn_on:
service: switch.turn_on
target:
entity_id: switch.mailbox
turn_off:
service: switch.turn_off
target:
entity_id: switch.mailbox
icon_template: >
{% if is_state('switch.mailbox', 'on') %}
mdi:mailbox
{% else %}
mdi:mailbox-outline
{% endif %}