School status widget for mobile dashboard
home_automation/Home-Assistant-Configs#245
This commit is contained in:
@ -3716,6 +3716,51 @@ views:
|
||||
- condition: state
|
||||
entity: binary_sensor.emma_bedroom_door
|
||||
state: 'on'
|
||||
- type: custom:mushroom-template-badge
|
||||
content: |-
|
||||
{% if is_state('input_boolean.school_cancelled','on') %}
|
||||
Cancelled
|
||||
{% elif is_state('input_boolean.two_hour_delay','on') %}
|
||||
Two Hour Delay
|
||||
{% else %}
|
||||
On Time
|
||||
{% endif %}
|
||||
icon: |-
|
||||
{% if is_state('input_boolean.school_cancelled','on') %}
|
||||
m3rf:cancel
|
||||
{% elif is_state('input_boolean.two_hour_delay','on') %}
|
||||
m3rf:clock-arrow-up
|
||||
{% else %}
|
||||
m3rf:check-circle
|
||||
{% endif %}
|
||||
color: |-
|
||||
{% if is_state('input_boolean.school_cancelled','on') %}
|
||||
red
|
||||
{% elif is_state('input_boolean.two_hour_delay','on') %}
|
||||
yellow
|
||||
{% else %}
|
||||
green
|
||||
{% endif %}
|
||||
label: School Status
|
||||
tap_action:
|
||||
action: url
|
||||
url_path: https://1057thebull.iheart.com/content/school-delays/
|
||||
hold_action:
|
||||
action: none
|
||||
double_tap_action:
|
||||
action: none
|
||||
visibility:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity: input_boolean.kallen_school_today
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity: input_boolean.two_hour_delay
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity: input_boolean.school_cancelled
|
||||
state: 'on'
|
||||
- type: custom:mushroom-template-badge
|
||||
content: |-
|
||||
{% if is_state(entity,'on') %}
|
||||
|
Reference in New Issue
Block a user