Skip to content

Instantly share code, notes, and snippets.

@tioan
Last active August 14, 2020 19:19
Show Gist options
  • Save tioan/ae95e43ae828ce41ae5587af839cd74b to your computer and use it in GitHub Desktop.
Save tioan/ae95e43ae828ce41ae5587af839cd74b to your computer and use it in GitHub Desktop.
- platform: template
fans:
bedroom_fan:
friendly_name: "Bedroom fan"
value_template: "{{ states('switch.shelly_shsw_pm_006037') }}"
turn_on:
service: switch.turn_on
entity_id: switch.shelly_shsw_pm_006037
turn_off:
service: switch.turn_off
entity_id: switch.shelly_shsw_pm_006037
availability_template: "{% if (is_state('switch.shelly_shsw_pm_006037', 'on' )) or (is_state('switch.shelly_shsw_pm_006037', 'off')) %}
true
{% else %}
false
{% endif %}"
workinf version under developer tools template:
{% if (is_state('switch.shelly_shsw_pm_006037', 'on' )) or (is_state('switch.shelly_shsw_pm_006037', 'off')) %}
true
{% else %}
false
{% endif %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment