Created
September 11, 2018 14:17
-
-
Save esteele/6d5a714a1c3ce3d2c88599a811d214c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
binary_sensor: | |
- platform: template | |
sensors: | |
is_school_day_today: | |
entity_id: | |
- calendar.is_school_day1 | |
- calendar.is_school_day2 | |
- calendar.is_school_day3 | |
- calendar.is_school_day4 | |
- calendar.is_school_day5 | |
- calendar.is_school_day6 | |
value_template: >- | |
{% if is_state("calendar.is_school_day1", "on") or | |
is_state("calendar.is_school_day2", "on") or | |
is_state("calendar.is_school_day3", "on") or | |
is_state("calendar.is_school_day4", "on") or | |
is_state("calendar.is_school_day5", "on") or | |
is_state("calendar.is_school_day6", "on") | |
-%} | |
on | |
{%- else -%} | |
off | |
{%- endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment