Compare commits

...

3 Commits

3 changed files with 287 additions and 82 deletions

View File

@@ -1057,6 +1057,10 @@ views:
| int %} {% set high =
states('sensor.stratton_ave_apparent_temperature') | int %} {{
'Threshold Met' if high <= threshold else '' }}
- entity: input_number.window_weather_minimum
name: Window Minimum
- entity: input_number.window_weather_maximum
name: Window Maximum
show_header_toggle: false
state_color: true
title: Weather
@@ -1240,6 +1244,20 @@ views:
state: 'on'
show_header_toggle: false
state_color: true
- type: custom:expander-card
title: More Settings
cards:
- type: entities
entities:
- entity: input_boolean.emma_bedroom_mode_switch
name: Mode Switch
- entity: input_select.emma_bedroom_mode_switch
name: Mode
- entity: input_datetime.emma_bedroom_mode_switch
name: Switch Time
- entity: input_number.emma_bedroom_auto_mode_threshold
name: Switch Threshold
icon: mdi:cog
- type: grid
cards:
- type: heading

View File

@@ -430,6 +430,73 @@ views:
entity: binary_sensor.lightning_warning
state: 'on'
features_position: bottom
- type: custom:mushroom-template-card
primary: Window Weather
tap_action:
action: none
icon_tap_action:
action: none
features_position: bottom
entity: binary_sensor.window_weather
icon: |-
{% if is_state('binary_sensor.windows','on') %}
mdi:window-open
{% else %}
mdi:window-closed
{% endif %}
color: |-
{% if is_state(entity,'on') %}
{% if is_state('binary_sensor.windows','on') %}
var(--cyan-color)
{% else %}
var(--green-color)
{% endif %}
{% else %}
{% if is_state('binary_sensor.windows','on') %}
var(--error-color)
{% else %}
var(--disabled-color)
{% endif %}
{% endif %}
secondary: |-
{% if is_state(entity,'on') %}
It's nice outside!
{% else %}
Close Windows!
{% endif %}
badge_icon: >-
{% if is_state(entity,'off') and
is_state('binary_sensor.windows','on') %}
mdi:exclamation
{% elif is_state(entity,'on') and
is_state('binary_sensor.windows','on') %}
mdi:check
{% endif %}
badge_color: >-
{% if is_state(entity,'off') and
is_state('binary_sensor.windows','on') %}
var(--error-color)
{% elif is_state(entity,'on') and
is_state('binary_sensor.windows','on') %}
var(--success-color)
{% endif %}
visibility:
- condition: or
conditions:
- condition: state
entity: binary_sensor.window_weather
state: 'on'
- condition: state
entity: binary_sensor.windows
state: 'on'
column_span: 1
- type: grid
cards:

View File

@@ -276,7 +276,8 @@ streamline_templates:
- default
- state_color_button
state_color_button:
color: '[[color]]'
on_color: '[[on_color]]'
off_color: '[[off_color]]'
state_color_button_nav:
defaults:
- name: ''
@@ -309,7 +310,8 @@ streamline_templates:
- default
- state_color_button
state_color_button:
color: '[[color]]'
on_color: '[[on_color]]'
off_color: '[[off_color]]'
contact_sensor_button:
defaults:
- name: ''
@@ -339,7 +341,8 @@ streamline_templates:
- state_color_button
- get_state_attribute
state_color_button:
color: '[[color]]'
on_color: '[[on_color]]'
off_color: '[[off_color]]'
get_state_attribute:
- entity: '[[entity]]'
- entity: '[[entity]]_tamper'
@@ -623,7 +626,8 @@ views:
- entity: binary_sensor.security_faults
- navigation_path: '#security'
- columns: 2
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- show_state: false
grid_options:
columns: 6
@@ -1653,13 +1657,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.basement_studio_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.basement_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: popup_timer_card
variables:
@@ -1859,19 +1865,22 @@ views:
variables:
name: Front Motion
entity: binary_sensor.living_room_front_motion
color: bubble-accent-color
on_color: bubble-accent-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
name: Back Motion
entity: binary_sensor.living_room_back_motion
color: bubble-accent-color
on_color: bubble-accent-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
name: Occupied
entity: binary_sensor.living_room_occupied
color: bubble-accent-color
on_color: bubble-accent-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: popup_timer_card
variables:
@@ -1888,7 +1897,8 @@ views:
variables:
name: Door
entity: binary_sensor.front_door
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty-column
- type: custom:bubble-card
@@ -1900,19 +1910,22 @@ views:
variables:
name: Front 1
entity: binary_sensor.front_window_1
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Front 2
entity: binary_sensor.front_window_2
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Front 3
entity: binary_sensor.front_window_3
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: horizontal-stack
cards:
- type: custom:streamline-card
@@ -1920,19 +1933,22 @@ views:
variables:
name: Side 1
entity: binary_sensor.side_window_1
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Side 2
entity: binary_sensor.side_window_2
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Side 3
entity: binary_sensor.side_window_3
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: horizontal-stack
cards:
- type: custom:streamline-card
@@ -1940,19 +1956,22 @@ views:
variables:
name: Side 4
entity: binary_sensor.side_window_4
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Back 1
entity: binary_sensor.back_window_1
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Back 2
entity: binary_sensor.back_window_2
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: vertical-stack
cards:
- type: custom:bubble-card
@@ -2029,13 +2048,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.downstairs_bathroom_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.downstairs_bathroom_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Security
@@ -2047,13 +2068,15 @@ views:
variables:
name: Back
entity: binary_sensor.downstairs_bathroom_window_1
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Side
entity: binary_sensor.downstairs_bathroom_window_2
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: popup_timer_card
variables:
@@ -2143,13 +2166,15 @@ views:
variables:
name: Big Window
entity: binary_sensor.kitchen_big_window
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Sink Window
entity: binary_sensor.kitchen_sink_window
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: vertical-stack
cards:
- type: custom:bubble-card
@@ -2216,13 +2241,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.mud_room_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.mud_room_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Security
@@ -2234,13 +2261,15 @@ views:
variables:
name: Back Door
entity: binary_sensor.back_door
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Window
entity: binary_sensor.mud_room_window
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: popup_timer_card
variables:
@@ -2309,13 +2338,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.stairwell_bottom_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.stairwell_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Security
@@ -2327,7 +2358,8 @@ views:
variables:
name: Window
entity: binary_sensor.stairway_window_lower
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty-column
- type: custom:streamline-card
@@ -2406,13 +2438,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.stairwell_top_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.upstairs_hallway_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Security
@@ -2424,7 +2458,8 @@ views:
variables:
name: Window
entity: binary_sensor.stairway_window_upper
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty-column
- type: custom:streamline-card
@@ -2530,13 +2565,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.upstairs_bathroom_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.upstairs_bathroom_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Security
@@ -2548,7 +2585,8 @@ views:
variables:
name: Window
entity: binary_sensor.upstairs_bathroom_window
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty-column
- type: custom:streamline-card
@@ -2815,13 +2853,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.master_bedroom_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.master_bedroom_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Security
@@ -2833,13 +2873,15 @@ views:
variables:
name: Window 1
entity: binary_sensor.master_bedroom_window_1
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Window 2
entity: binary_sensor.master_bedroom_window_2
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: popup_timer_card
variables:
@@ -3023,13 +3065,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.kallen_bedroom_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.kallen_bedroom_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Security
@@ -3041,13 +3085,15 @@ views:
variables:
name: Window 1
entity: binary_sensor.kallen_bedroom_window_1
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Window 2
entity: binary_sensor.kallen_bedroom_window_2
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: popup_timer_card
variables:
@@ -3325,13 +3371,15 @@ views:
variables:
- name: Motion
- entity: binary_sensor.emma_bedroom_motion
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: state_color_button
variables:
- name: Occupied
- entity: binary_sensor.emma_bedroom_occupied
- color: bubble-accent-color
- on_color: bubble-accent-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Security
@@ -3343,13 +3391,15 @@ views:
variables:
name: Door
entity: binary_sensor.emma_bedroom_door
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
name: Window
entity: binary_sensor.emma_bedroom_window
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:streamline-card
template: popup_timer_card
variables:
@@ -3399,13 +3449,15 @@ views:
variables:
- name: Front
- entity: binary_sensor.front_door
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Back
- entity: binary_sensor.back_door
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Basement Studio
@@ -3417,7 +3469,8 @@ views:
variables:
- name: Door
- entity: binary_sensor.basement_studio_door
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty-column
- type: custom:bubble-card
@@ -3431,19 +3484,22 @@ views:
variables:
- name: Front 1
- entity: binary_sensor.front_window_1
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Front 2
- entity: binary_sensor.front_window_2
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Front 3
- entity: binary_sensor.front_window_3
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: horizontal-stack
cards:
- type: custom:streamline-card
@@ -3451,19 +3507,22 @@ views:
variables:
- name: Side 1
- entity: binary_sensor.side_window_1
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Side 2
- entity: binary_sensor.side_window_2
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Side 3
- entity: binary_sensor.side_window_3
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: horizontal-stack
cards:
- type: custom:streamline-card
@@ -3471,19 +3530,22 @@ views:
variables:
- name: Side 4
- entity: binary_sensor.side_window_4
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Back 1
- entity: binary_sensor.back_window_1
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Back 2
- entity: binary_sensor.back_window_2
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Stairwell
@@ -3495,7 +3557,8 @@ views:
variables:
- name: Window
- entity: binary_sensor.stairway_window_lower
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty-column
- type: custom:bubble-card
@@ -3509,13 +3572,15 @@ views:
variables:
- name: Big
- entity: binary_sensor.kitchen_big_window
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Sink
- entity: binary_sensor.kitchen_sink_window
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Mud Room
@@ -3527,7 +3592,8 @@ views:
variables:
- name: Window
- entity: binary_sensor.mud_room_window
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty-column
- type: custom:bubble-card
@@ -3541,13 +3607,15 @@ views:
variables:
- name: Back
- entity: binary_sensor.downstairs_bathroom_window_1
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Side
- entity: binary_sensor.downstairs_bathroom_window_2
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Upstairs Hallway
@@ -3559,7 +3627,8 @@ views:
variables:
- name: Window
- entity: binary_sensor.stairway_window_upper
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty_column
- type: custom:bubble-card
@@ -3573,7 +3642,8 @@ views:
variables:
- name: Window
- entity: binary_sensor.upstairs_bathroom_window
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: empty_column
- type: custom:bubble-card
@@ -3587,13 +3657,15 @@ views:
variables:
- name: Window
- entity: binary_sensor.master_bedroom_window_1
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Window 1
- entity: binary_sensor.master_bedroom_window_2
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Kallen Bedroom
@@ -3605,13 +3677,15 @@ views:
variables:
- name: Window 1
- entity: binary_sensor.kallen_bedroom_window_1
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Window 2
- entity: binary_sensor.kallen_bedroom_window_2
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: separator
name: Emma Bedroom
@@ -3623,13 +3697,15 @@ views:
variables:
- name: Door
- entity: binary_sensor.emma_bedroom_door
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: custom:streamline-card
template: contact_sensor_button
variables:
- name: Window
- entity: binary_sensor.emma_bedroom_window
- color: error-color
- on_color: error-color
- off_color: bubble-main-background-color
- type: vertical-stack
cards:
- type: custom:bubble-card
@@ -4276,6 +4352,44 @@ views:
- condition: state
entity: binary_sensor.windows
state: 'on'
- type: custom:mushroom-template-badge
content: |-
{% if is_state(entity,'on') %}
It's nice outside!
{% else %}
Close Windows!
{% endif %}
icon: |-
{% if is_state('binary_sensor.windows','on') %}
mdi:window-open
{% else %}
mdi:window-closed
{% endif %}
color: |-
{% if is_state(entity,'on') %}
{% if is_state('binary_sensor.windows','on') %}
var(--cyan-color)
{% else %}
var(--green-color)
{% endif %}
{% else %}
{% if is_state('binary_sensor.windows','on') %}
var(--error-color)
{% else %}
var(--disabled-color)
{% endif %}
{% endif %}
entity: binary_sensor.window_weather
label: Window Weather
visibility:
- condition: or
conditions:
- condition: state
entity: binary_sensor.window_weather
state: 'on'
- condition: state
entity: binary_sensor.windows
state: 'on'
- type: custom:mushroom-template-badge
content: Check light switches
icon: mdi:light-switch
@@ -6451,7 +6565,8 @@ views:
variables:
entity: input_boolean.toggle_testing
name: State Color Button
color: bubble-accent-color
on_color: bubble-accent-color
off_color: bubble-main-background-color
columns: '2'
- type: custom:streamline-card
template: state_color_button_nav
@@ -6459,14 +6574,16 @@ views:
entity: input_boolean.toggle_testing
name: State Color Button Nav
navigation_path: '#security'
color: error-color
on_color: error-color
off_color: bubble-main-background-color
columns: '2'
- type: custom:streamline-card
template: contact_sensor_button
variables:
entity: binary_sensor.side_window_1
name: Contact Sensor Button
color: error-color
on_color: error-color
off_color: bubble-main-background-color
columns: '2'
- type: grid
cards:
@@ -6645,7 +6762,8 @@ views:
- default
- state_color_button
state_color_button:
color: bubble-accent-color
on_color: bubble-accent-color
off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: button
button_type: state
@@ -6672,7 +6790,8 @@ views:
- default
- state_color_button
state_color_button:
color: error-color
on_color: error-color
off_color: bubble-main-background-color
- type: custom:bubble-card
card_type: button
button_type: state
@@ -6696,7 +6815,8 @@ views:
- state_color_button
- get_state_attribute
state_color_button:
color: error-color
on_color: error-color
off_color: bubble-main-background-color
get_state_attribute:
- entity: binary_sensor.side_window_1
- entity: binary_sensor.side_window_1_tamper