912 lines
32 KiB
YAML
912 lines
32 KiB
YAML
title: Home
|
||
button_card_templates:
|
||
sensor:
|
||
aspect_ratio: 1.2/1
|
||
show_state: true
|
||
show_icon: true
|
||
sensor_battery:
|
||
template: sensor
|
||
icon: |
|
||
[[[
|
||
if (entity.state < 5) return 'mdi:battery-alert-variant-outline';
|
||
if (entity.state >= 5 && entity.state <15) return 'mdi:battery-10';
|
||
if (entity.state >= 15 && entity.state < 25) return 'mdi:battery-20';
|
||
if (entity.state >= 25 && entity.state < 35) return 'mdi:battery-30';
|
||
if (entity.state >= 35 && entity.state < 45) return 'mdi:battery-40';
|
||
if (entity.state >= 45 && entity.state < 55) return 'mdi:battery-50';
|
||
if (entity.state >= 55 && entity.state < 65) return 'mdi:battery-60';
|
||
if (entity.state >= 65 && entity.state < 75) return 'mdi:battery-70';
|
||
if (entity.state >= 75 && entity.state < 85) return 'mdi:battery-80';
|
||
if (entity.state >= 85 && entity.state < 95) return 'mdi:battery-90';
|
||
if (entity.state >= 95) return 'mdi:battery';
|
||
else return 'mdi:battery-alert-variant-outline';
|
||
]]]
|
||
style:
|
||
- padding: 0px
|
||
styles:
|
||
icon:
|
||
- color: |
|
||
[[[
|
||
if (entity.state < 15) return 'red';
|
||
if (entity.state >= 15 && entity.state <25) return 'firebrick';
|
||
if (entity.state >= 25 && entity.state < 55) return 'orange';
|
||
if (entity.state >= 55) return 'green';
|
||
else return 'red';
|
||
]]]
|
||
views:
|
||
- title: Home
|
||
cards: []
|
||
type: sections
|
||
icon: mdi:home
|
||
badges:
|
||
- type: custom:mushroom-chips-card
|
||
alignment: justify
|
||
chips:
|
||
- type: template
|
||
entity: binary_sensor.alarm_triggered
|
||
icon: '{{ state_attr("binary_sensor.alarm_triggered", "icon") }}'
|
||
icon_color: |
|
||
{% if is_state('binary_sensor.alarm_triggered', 'on') %}
|
||
red
|
||
{% else %}
|
||
#4682B4
|
||
{% endif %}
|
||
content: Alarm
|
||
tap_action:
|
||
action: navigate
|
||
navigation_path: /dashboard-sthome/alarm
|
||
- type: template
|
||
entity: binary_sensor.motion_detected
|
||
icon: '{{ state_attr("binary_sensor.motion_detected", "icon") }}'
|
||
icon_color: >-
|
||
{% set lc = (as_timestamp(now()) -
|
||
as_timestamp(states.binary_sensor.motion_detected.last_changed))|int
|
||
%} {{ "#ff0000" if lc < 10 }} {{ "#4d061c" if lc >= 10 and lc < 20
|
||
}} {{ "#d2042d" if lc >= 20 and lc < 45 }} {{ "#fA8072" if lc >=
|
||
45 and lc < 90 }} {{ "#ff8c00" if lc >= 90 and lc < 180 }} {{
|
||
"#ffa500" if lc >= 180 and lc < 400 }} {{ "#fff700" if lc >= 400
|
||
and lc < 830 }} {{ "#ffff00" if lc >= 830 and lc < 1725 }} {{
|
||
"#008000" if lc >= 1725 and lc < 3600 }} {{ "#4682B4" if lc >=
|
||
3600 and lc < 21600 }}
|
||
content: >-
|
||
{% set motion = is_state('binary_sensor.motion_detected', 'on') %}
|
||
{% set elapsed_time =
|
||
states['binary_sensor.motion_detected'].last_changed |
|
||
relative_time %} {{ 'Started' if motion else 'Stopped' }} · {{
|
||
elapsed_time }} ago
|
||
tap_action:
|
||
action: navigate
|
||
navigation_path: /dashboard-sthome/alarm
|
||
card_mod:
|
||
style:
|
||
mushroom-template-chip:nth-child(2)$: |
|
||
ha-state-icon {
|
||
{{ 'animation: clip 2s linear infinite;' if is_state('binary_sensor.motion_detected', 'on') }}
|
||
}
|
||
@keyframes clip {
|
||
50% { clip-path: polygon(0 0, 61% 0, 66% 100%, 0% 100%); }
|
||
}
|
||
sections:
|
||
- type: grid
|
||
cards:
|
||
- type: custom:mushroom-chips-card
|
||
chips:
|
||
- type: entity
|
||
entity: sun.sun
|
||
tap_action:
|
||
action: more-info
|
||
- type: template
|
||
content: >-
|
||
Sunrise {% if states.sun.sun %} {{
|
||
(as_timestamp(states.sun.sun.attributes.next_rising)) |
|
||
timestamp_custom(('%H:%M') )}} {% endif %}
|
||
icon: mdi:weather-sunset-up
|
||
- type: template
|
||
content: >-
|
||
Sunset {% if states.sun.sun %} {{
|
||
(as_timestamp(states.sun.sun.attributes.next_setting)) |
|
||
timestamp_custom(('%H:%M') )}} {% endif %}
|
||
icon: mdi:weather-sunset-down
|
||
- type: entity
|
||
entity: sensor.moon_phase
|
||
tap_action:
|
||
action: more-info
|
||
- show_current: true
|
||
show_forecast: true
|
||
type: weather-forecast
|
||
entity: weather.forecast_home
|
||
secondary_info_attribute: humidity
|
||
forecast_type: daily
|
||
- type: custom:mushroom-person-card
|
||
entity: person.chris
|
||
name: Chris
|
||
tap_action:
|
||
action: more-info
|
||
- type: custom:mushroom-person-card
|
||
entity: person.zelna
|
||
name: Zelna
|
||
tap_action:
|
||
action: more-info
|
||
- type: grid
|
||
cards:
|
||
- type: heading
|
||
heading: Media players
|
||
heading_style: title
|
||
icon: mdi:television
|
||
- type: custom:mushroom-media-player-card
|
||
entity: media_player.smart_tv
|
||
name: Hisense
|
||
icon: mdi:television
|
||
collapsible_controls: true
|
||
use_media_info: true
|
||
volume_controls:
|
||
- volume_mute
|
||
- volume_set
|
||
- volume_buttons
|
||
media_controls:
|
||
- on_off
|
||
- shuffle
|
||
- previous
|
||
- play_pause_stop
|
||
- next
|
||
- repeat
|
||
show_volume_level: true
|
||
- type: custom:mushroom-media-player-card
|
||
entity: media_player.xiaomi_tv_box_2
|
||
name: Xiaomi
|
||
icon: mdi:television-box
|
||
collapsible_controls: true
|
||
use_media_info: true
|
||
volume_controls:
|
||
- volume_mute
|
||
- volume_set
|
||
- volume_buttons
|
||
media_controls:
|
||
- on_off
|
||
- shuffle
|
||
- previous
|
||
- play_pause_stop
|
||
- next
|
||
- repeat
|
||
show_volume_level: true
|
||
- type: custom:mushroom-media-player-card
|
||
entity: media_player.nova4k
|
||
name: Nova4k
|
||
icon: mdi:television-box
|
||
collapsible_controls: true
|
||
use_media_info: true
|
||
volume_controls:
|
||
- volume_mute
|
||
- volume_set
|
||
- volume_buttons
|
||
media_controls:
|
||
- on_off
|
||
- shuffle
|
||
- previous
|
||
- play_pause_stop
|
||
- next
|
||
- repeat
|
||
show_volume_level: true
|
||
- type: grid
|
||
cards:
|
||
- type: heading
|
||
heading: Phones
|
||
heading_style: title
|
||
- type: custom:mushroom-template-card
|
||
secondary: '{{ states[''sensor.sm_n986b_battery_level''].state }}%'
|
||
icon_color: |-
|
||
{% set state=states['sensor.sm_n986b_battery_level'].state %}
|
||
{% if state|int < 15 %}
|
||
red
|
||
{% elif (state|int > 15 and state|int < 25) %}
|
||
#b22222
|
||
{% elif (state|int > 25 and state|int < 55) %}
|
||
orange
|
||
{% else %}
|
||
green
|
||
{% endif %}
|
||
icon: '{{ state_attr("sensor.sm_n986b_battery_level", "icon") }}'
|
||
tap_action:
|
||
action: more-info
|
||
entity: sensor.sm_n986b_battery_level
|
||
primary: Chris (S20)
|
||
badge_icon: ''
|
||
- type: custom:mushroom-template-card
|
||
primary: Zelna (C20)
|
||
secondary: '{{ states[''sensor.nokia_c20_battery_level''].state }}%'
|
||
entity: sensor.nokia_c20_battery_level
|
||
icon_color: |-
|
||
{% set state=states['sensor.nokia_c20_battery_level'].state %}
|
||
{% if state|int < 15 %}
|
||
red
|
||
{% elif (state|int > 15 and state|int < 25) %}
|
||
#b22222
|
||
{% elif (state|int > 25 and state|int < 55) %}
|
||
orange
|
||
{% else %}
|
||
green
|
||
{% endif %}
|
||
icon: '{{ state_attr("sensor.nokia_c20_battery_level", "icon") }}'
|
||
tap_action:
|
||
action: more-info
|
||
- type: custom:mushroom-template-card
|
||
primary: Zelna (A9)
|
||
secondary: '{{ states[''sensor.sm_x115_battery_level''].state }}%'
|
||
entity: sensor.sm_x115_battery_level
|
||
icon_color: |-
|
||
{% set state=states['sensor.sm_x115_battery_level'].state %}
|
||
{% if state|int < 15 %}
|
||
red
|
||
{% elif (state|int > 15 and state|int < 25) %}
|
||
#b22222
|
||
{% elif (state|int > 25 and state|int < 55) %}
|
||
orange
|
||
{% else %}
|
||
green
|
||
{% endif %}
|
||
icon: '{{ state_attr("sensor.sm_x115_battery_level", "icon") }}'
|
||
tap_action:
|
||
action: more-info
|
||
- type: custom:mushroom-template-card
|
||
primary: Roderique (A03 Core)
|
||
secondary: '{{ states[''sensor.sm_a032f_battery_level''].state }}%'
|
||
icon_color: |-
|
||
{% set state=states['sensor.sm_a032f_battery_level'].state %}
|
||
{% if state|int < 15 %}
|
||
red
|
||
{% elif (state|int > 15 and state|int < 25) %}
|
||
#b22222
|
||
{% elif (state|int > 25 and state|int < 55) %}
|
||
orange
|
||
{% else %}
|
||
green
|
||
{% endif %}
|
||
icon: '{{ state_attr(''sensor.sm_a032f_battery_level'', ''icon'') }}'
|
||
tap_action:
|
||
action: more-info
|
||
entity: sensor.sm_a032f_battery_level
|
||
- type: custom:mushroom-template-card
|
||
secondary: '{{ states[''sensor.sm_a245f_battery_level''].state }}%'
|
||
icon_color: |-
|
||
{% set state=states['sensor.sm_a245f_battery_level'].state %}
|
||
{% if state|int < 15 %}
|
||
red
|
||
{% elif (state|int > 15 and state|int < 25) %}
|
||
#b22222
|
||
{% elif (state|int > 25 and state|int < 55) %}
|
||
orange
|
||
{% else %}
|
||
green
|
||
{% endif %}
|
||
icon: '{{ state_attr(''sensor.sm_a245f_battery_level'', ''icon'') }}'
|
||
tap_action:
|
||
action: more-info
|
||
entity: sensor.sm_a245f_battery_level
|
||
primary: Carlton (A24)
|
||
- type: custom:mushroom-template-card
|
||
secondary: '{{ states[''sensor.sm_a042f_battery_level''].state }}%'
|
||
icon_color: |-
|
||
{% set state=states['sensor.sm_a042f_battery_level'].state %}
|
||
{% if state|int < 15 %}
|
||
red
|
||
{% elif (state|int > 15 and state|int < 25) %}
|
||
#b22222
|
||
{% elif (state|int > 25 and state|int < 55) %}
|
||
orange
|
||
{% else %}
|
||
green
|
||
{% endif %}
|
||
icon: '{{ state_attr(''sensor.sm_a042f_battery_level'', ''icon'') }}'
|
||
tap_action:
|
||
action: more-info
|
||
entity: sensor.sm_a042f_battery_level
|
||
primary: Zelmique (A04)
|
||
- type: grid
|
||
cards:
|
||
- type: heading
|
||
heading: Counters
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.sm_n986b_notification_counter
|
||
name: S20
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.nokia_c20_notification_counter
|
||
name: Nokia C20
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.sm_a032f_notification_counter
|
||
name: A03 Core
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.sm_x115_notification_counter
|
||
name: A9 tablet
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.driveway_person_alarm_counter
|
||
name: Driveway
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.east_wall_person_alarm_counter
|
||
name: Eastwall
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.backyard_person_alarm_counter
|
||
name: Backyard
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.patio_person_alarm_counter
|
||
name: Patio
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: counter.west_wall_person_alarm_counter
|
||
name: Westwall
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: grid
|
||
cards:
|
||
- type: heading
|
||
heading: Work in progress
|
||
heading_style: title
|
||
icon: mdi:spade
|
||
- type: custom:mushroom-entity-card
|
||
entity: switch.sthome_ut1_relay_2
|
||
name: Relay 2
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: switch.sthome_ut1_relay_3
|
||
name: Relay 3
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: binary_sensor.gate_lock
|
||
name: Gate lock
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
- type: custom:mushroom-entity-card
|
||
entity: switch.sthome_ut4_relay_6
|
||
name: Open/Close gate
|
||
secondary_info: state
|
||
grid_options:
|
||
columns: 4
|
||
rows: 1
|
||
header:
|
||
card:
|
||
type: markdown
|
||
text_only: true
|
||
content: |-
|
||
# Hello {{ user }}
|
||
sthome dashboard ✨
|
||
max_columns: 2
|
||
dense_section_placement: true
|
||
- title: Security Cameras
|
||
cards: []
|
||
icon: mdi:cctv
|
||
type: sections
|
||
sections:
|
||
- type: grid
|
||
cards:
|
||
- type: heading
|
||
heading: Cameras
|
||
heading_style: title
|
||
icon: mdi:cctv
|
||
- show_state: true
|
||
show_name: false
|
||
camera_view: auto
|
||
type: picture-entity
|
||
entity: camera.driveway
|
||
grid_options:
|
||
columns: 12
|
||
rows: auto
|
||
- show_state: true
|
||
show_name: false
|
||
camera_view: auto
|
||
type: picture-entity
|
||
entity: camera.patio
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
- show_state: true
|
||
show_name: false
|
||
camera_view: auto
|
||
type: picture-entity
|
||
entity: camera.eastwall
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
aspect_ratio: 1/1
|
||
- show_state: true
|
||
show_name: false
|
||
camera_view: auto
|
||
type: picture-entity
|
||
entity: camera.westwall
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
- show_state: true
|
||
show_name: false
|
||
camera_view: auto
|
||
type: picture-entity
|
||
entity: camera.backyard
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
column_span: 1
|
||
- type: grid
|
||
cards:
|
||
- type: heading
|
||
heading: Detections
|
||
heading_style: title
|
||
- type: picture
|
||
image_entity: image.driveway_person
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
- type: picture
|
||
image_entity: image.driveway_car
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
- type: picture
|
||
image_entity: image.eastwall_person
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
- type: picture
|
||
image_entity: image.patio_person
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
- type: picture
|
||
image_entity: image.westwall_person
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
- type: picture
|
||
image_entity: image.backyard_person
|
||
grid_options:
|
||
columns: 6
|
||
rows: auto
|
||
header:
|
||
card:
|
||
type: markdown
|
||
text_only: true
|
||
content: Security Cameras
|
||
max_columns: 4
|
||
dense_section_placement: true
|
||
badges:
|
||
- type: entity
|
||
entity: counter.driveway_person_alarm_counter
|
||
- type: entity
|
||
entity: counter.east_wall_person_alarm_counter
|
||
- type: entity
|
||
entity: counter.patio_person_alarm_counter
|
||
- type: entity
|
||
entity: counter.west_wall_person_alarm_counter
|
||
- type: entity
|
||
entity: counter.backyard_person_alarm_counter
|
||
- type: sections
|
||
max_columns: 10
|
||
subview: false
|
||
path: alarm
|
||
title: Alarm
|
||
icon: mdi:alarm-light
|
||
sections:
|
||
- type: grid
|
||
cards:
|
||
- type: heading
|
||
heading: Settings
|
||
heading_style: title
|
||
- type: custom:mushroom-template-card
|
||
icon: |-
|
||
{% set state = states["input_boolean.motion_detect"].state %}
|
||
{% if state == 'on' %}
|
||
mdi:motion-sensor
|
||
{% elif state == 'off'%}
|
||
mdi:motion-sensor-off
|
||
{% else %}
|
||
mdi:motion-sensor-off
|
||
{% endif %}
|
||
primary: '{{ states["input_boolean.motion_detect"].name }}'
|
||
secondary: '{{ states["input_boolean.motion_detect"].state }}'
|
||
icon_color: |-
|
||
{% if is_state('input_boolean.motion_detect', 'on') %}
|
||
green
|
||
{% else %}
|
||
#4682B4
|
||
{% endif %}
|
||
badge_icon: ''
|
||
badge_color: ''
|
||
entity: input_boolean.motion_detect
|
||
tap_action:
|
||
action: toggle
|
||
- type: custom:mushroom-template-card
|
||
entity: input_boolean.notify_sm_n986b
|
||
secondary: '{{ states["input_boolean.notify_sm_n986b"].state }}'
|
||
icon: |-
|
||
{% if is_state('input_boolean.notify_sm_n986b', 'on') %}
|
||
{{ state_attr("input_boolean.notify_sm_n986b", "icon") }}
|
||
{% else %}
|
||
mdi:cellphone-off
|
||
{% endif %}
|
||
primary: Notify Chris (S20)
|
||
icon_color: |-
|
||
{% if is_state('input_boolean.notify_sm_n986b', 'on') %}
|
||
green
|
||
{% else %}
|
||
#4682B4
|
||
{% endif %}
|
||
- type: custom:mushroom-template-card
|
||
entity: input_boolean.notify_nokia_c20
|
||
secondary: '{{ states[''input_boolean.notify_nokia_c20''].state }}'
|
||
icon: |-
|
||
{% if is_state('input_boolean.notify_nokia_c20', 'on') %}
|
||
{{ state_attr("input_boolean.notify_nokia_c20", "icon") }}
|
||
{% else %}
|
||
mdi:cellphone-off
|
||
{% endif %}
|
||
primary: Notify Zelna (C20)
|
||
icon_color: |-
|
||
{% if is_state('input_boolean.notify_nokia_c20', 'on') %}
|
||
green
|
||
{% else %}
|
||
#4682B4
|
||
{% endif %}
|
||
- type: custom:mushroom-template-card
|
||
entity: input_boolean.notify_sm_x115
|
||
secondary: '{{ states[''input_boolean.notify_sm_x115''].state }}'
|
||
icon: |-
|
||
{% if is_state('input_boolean.notify_sm_x115', 'on') %}
|
||
{{ state_attr("input_boolean.notify_sm_x115", "icon") }}
|
||
{% else %}
|
||
mdi:cellphone-off
|
||
{% endif %}
|
||
primary: Notify Zelna (A9)
|
||
icon_color: |-
|
||
{% if is_state('input_boolean.notify_sm_x115', 'on') %}
|
||
green
|
||
{% else %}
|
||
#4682B4
|
||
{% endif %}
|
||
- type: custom:mushroom-template-card
|
||
secondary: '{{ states[''input_boolean.notify_sm_a032f''].state }}'
|
||
icon: |-
|
||
{% if is_state('input_boolean.notify_sm_a032f', 'on') %}
|
||
{{ state_attr("input_boolean.notify_sm_a032f", "icon") }}
|
||
{% else %}
|
||
mdi:cellphone-off
|
||
{% endif %}
|
||
primary: Notify Roderique (A03C)
|
||
icon_color: |-
|
||
{% if is_state('input_boolean.notify_sm_a032f', 'on') %}
|
||
green
|
||
{% else %}
|
||
#4682B4
|
||
{% endif %}
|
||
tap_action:
|
||
action: toggle
|
||
entity: input_boolean.notify_sm_a032f
|
||
- type: custom:mushroom-template-card
|
||
secondary: '{{ states[''input_boolean.notify_sm_a245f''].state }}'
|
||
icon: |-
|
||
{% if is_state('input_boolean.notify_sm_a245f', 'on') %}
|
||
{{ state_attr("input_boolean.notify_sm_a245f", "icon") }}
|
||
{% else %}
|
||
mdi:cellphone-off
|
||
{% endif %}
|
||
icon_color: |-
|
||
{% if is_state('input_boolean.notify_sm_a245f', 'on') %}
|
||
green
|
||
{% else %}
|
||
#4682B4
|
||
{% endif %}
|
||
tap_action:
|
||
action: toggle
|
||
entity: input_boolean.notify_sm_a245f
|
||
primary: Notify Carlton (A24)
|
||
- type: custom:mushroom-template-card
|
||
secondary: '{{ states[''input_boolean.notify_sm_a042f''].state }}'
|
||
icon: |-
|
||
{% if is_state('input_boolean.notify_sm_a042f', 'on') %}
|
||
{{ state_attr("input_boolean.notify_sm_a042f", "icon") }}
|
||
{% else %}
|
||
mdi:cellphone-off
|
||
{% endif %}
|
||
icon_color: |-
|
||
{% if is_state('input_boolean.notify_sm_a042f', 'on') %}
|
||
green
|
||
{% else %}
|
||
#4682B4
|
||
{% endif %}
|
||
tap_action:
|
||
action: toggle
|
||
primary: Notify Zelmique (A04)
|
||
entity: input_boolean.notify_sm_a042f
|
||
column_span: 1
|
||
cards: []
|
||
badges:
|
||
- type: entity
|
||
show_name: true
|
||
show_state: true
|
||
show_icon: true
|
||
entity: binary_sensor.alarm_triggered
|
||
show_entity_picture: false
|
||
color: red
|
||
name: Siren
|
||
state_content:
|
||
- state
|
||
- last_changed
|
||
tap_action:
|
||
action: more-info
|
||
- type: entity
|
||
show_name: true
|
||
show_state: true
|
||
show_icon: true
|
||
entity: binary_sensor.zone_4_triggered
|
||
color: red
|
||
name: Zone 4
|
||
state_content:
|
||
- state
|
||
- last_changed
|
||
tap_action:
|
||
action: more-info
|
||
- type: entity
|
||
show_name: true
|
||
show_state: true
|
||
show_icon: true
|
||
entity: switch.sthome_ut1_floodlights_backyard
|
||
state_content:
|
||
- state
|
||
- last_changed
|
||
show_entity_picture: true
|
||
icon: mdi:light-flood-down
|
||
name: Backyard
|
||
double_tap_action:
|
||
action: toggle
|
||
tap_action:
|
||
action: more-info
|
||
- type: entity
|
||
show_name: true
|
||
show_state: true
|
||
show_icon: true
|
||
entity: binary_sensor.sthome_ut1_floodlights_test_mode
|
||
icon: mdi:light-flood-down
|
||
show_entity_picture: true
|
||
color: orange
|
||
name: Test mode
|
||
- type: custom:mushroom-template-badge
|
||
entity: binary_sensor.patio_motion_detect
|
||
content: >-
|
||
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
||
relative_time }}
|
||
icon: |-
|
||
{% set state = states(entity) %}
|
||
{% if state == 'on' %}
|
||
mdi:motion-sensor
|
||
{% elif state == 'off' %}
|
||
mdi:motion-sensor-off
|
||
{% else %}
|
||
mdi:motion-sensor-off
|
||
{% endif %}
|
||
color: >-
|
||
{% set lc = (as_timestamp(now()) -
|
||
as_timestamp(states[entity].last_changed))|int %} {{ "#ff0000" if lc <
|
||
10 }} {{ "#4d061c" if lc >= 10 and lc < 20 }} {{ "#d2042d" if lc >= 20
|
||
and lc < 45 }} {{ "#fA8072" if lc >= 45 and lc < 90 }} {{ "#ff8c00" if
|
||
lc >= 90 and lc < 180 }} {{ "#ffa500" if lc >= 180 and lc < 400 }} {{
|
||
"#fff700" if lc >= 400 and lc < 830 }} {{ "#ffff00" if lc >= 830 and
|
||
lc < 1725 }} {{ "#008000" if lc >= 1725 and lc < 3600 }} {{ "#4682B4"
|
||
if lc >= 3600 and lc < 21600 }}
|
||
label: '{{ states[entity].name }}'
|
||
tap_action:
|
||
action: more-info
|
||
- type: custom:mushroom-template-badge
|
||
content: >-
|
||
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
||
relative_time }}
|
||
color: >-
|
||
{% set lc = (as_timestamp(now()) -
|
||
as_timestamp(states[entity].last_changed))|int %} {{ "#ff0000" if lc <
|
||
10 }} {{ "#4d061c" if lc >= 10 and lc < 20 }} {{ "#d2042d" if lc >= 20
|
||
and lc < 45 }} {{ "#fA8072" if lc >= 45 and lc < 90 }} {{ "#ff8c00" if
|
||
lc >= 90 and lc < 180 }} {{ "#ffa500" if lc >= 180 and lc < 400 }} {{
|
||
"#fff700" if lc >= 400 and lc < 830 }} {{ "#ffff00" if lc >= 830 and
|
||
lc < 1725 }} {{ "#008000" if lc >= 1725 and lc < 3600 }} {{ "#4682B4"
|
||
if lc >= 3600 and lc < 21600 }}
|
||
label: '{{ states[entity].name }}'
|
||
tap_action:
|
||
action: more-info
|
||
entity: binary_sensor.driveway_motion_detect
|
||
icon: |-
|
||
{% set state = states(entity) %}
|
||
{% if state == 'on' %}
|
||
mdi:motion-sensor
|
||
{% elif state == 'off' %}
|
||
mdi:motion-sensor-off
|
||
{% else %}
|
||
mdi:motion-sensor-off
|
||
{% endif %}
|
||
- type: custom:mushroom-template-badge
|
||
content: >-
|
||
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
||
relative_time }}
|
||
icon: |-
|
||
{% set state = states(entity) %}
|
||
{% if state == 'on' %}
|
||
mdi:motion-sensor
|
||
{% elif state == 'off' %}
|
||
mdi:motion-sensor-off
|
||
{% else %}
|
||
mdi:motion-sensor-off
|
||
{% endif %}
|
||
color: >-
|
||
{% set lc = (as_timestamp(now()) -
|
||
as_timestamp(states[entity].last_changed))|int %} {{ "#ff0000" if lc <
|
||
10 }} {{ "#4d061c" if lc >= 10 and lc < 20 }} {{ "#d2042d" if lc >= 20
|
||
and lc < 45 }} {{ "#fA8072" if lc >= 45 and lc < 90 }} {{ "#ff8c00" if
|
||
lc >= 90 and lc < 180 }} {{ "#ffa500" if lc >= 180 and lc < 400 }} {{
|
||
"#fff700" if lc >= 400 and lc < 830 }} {{ "#ffff00" if lc >= 830 and
|
||
lc < 1725 }} {{ "#008000" if lc >= 1725 and lc < 3600 }} {{ "#4682B4"
|
||
if lc >= 3600 and lc < 21600 }}
|
||
label: '{{ states[entity].name }}'
|
||
tap_action:
|
||
action: more-info
|
||
entity: binary_sensor.eastwall_motion_detect
|
||
- type: custom:mushroom-template-badge
|
||
content: >-
|
||
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
||
relative_time }}
|
||
icon: |-
|
||
{% set state = states(entity) %}
|
||
{% if state == 'on' %}
|
||
mdi:motion-sensor
|
||
{% elif state == 'off' %}
|
||
mdi:motion-sensor-off
|
||
{% else %}
|
||
mdi:motion-sensor-off
|
||
{% endif %}
|
||
color: >-
|
||
{% set lc = (as_timestamp(now()) -
|
||
as_timestamp(states[entity].last_changed))|int %} {{ "#ff0000" if lc <
|
||
10 }} {{ "#4d061c" if lc >= 10 and lc < 20 }} {{ "#d2042d" if lc >= 20
|
||
and lc < 45 }} {{ "#fA8072" if lc >= 45 and lc < 90 }} {{ "#ff8c00" if
|
||
lc >= 90 and lc < 180 }} {{ "#ffa500" if lc >= 180 and lc < 400 }} {{
|
||
"#fff700" if lc >= 400 and lc < 830 }} {{ "#ffff00" if lc >= 830 and
|
||
lc < 1725 }} {{ "#008000" if lc >= 1725 and lc < 3600 }} {{ "#4682B4"
|
||
if lc >= 3600 and lc < 21600 }}
|
||
label: '{{ states[entity].name }}'
|
||
tap_action:
|
||
action: more-info
|
||
entity: binary_sensor.westwall_motion_detect
|
||
- type: custom:mushroom-template-badge
|
||
content: >-
|
||
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
||
relative_time }}
|
||
icon: |-
|
||
{% set state = states(entity) %}
|
||
{% if state == 'on' %}
|
||
mdi:motion-sensor
|
||
{% elif state == 'off' %}
|
||
mdi:motion-sensor-off
|
||
{% else %}
|
||
mdi:motion-sensor-off
|
||
{% endif %}
|
||
color: >-
|
||
{% set lc = (as_timestamp(now()) -
|
||
as_timestamp(states[entity].last_changed))|int %} {{ "#ff0000" if lc <
|
||
10 }} {{ "#4d061c" if lc >= 10 and lc < 20 }} {{ "#d2042d" if lc >= 20
|
||
and lc < 45 }} {{ "#fA8072" if lc >= 45 and lc < 90 }} {{ "#ff8c00" if
|
||
lc >= 90 and lc < 180 }} {{ "#ffa500" if lc >= 180 and lc < 400 }} {{
|
||
"#fff700" if lc >= 400 and lc < 830 }} {{ "#ffff00" if lc >= 830 and
|
||
lc < 1725 }} {{ "#008000" if lc >= 1725 and lc < 3600 }} {{ "#4682B4"
|
||
if lc >= 3600 and lc < 21600 }}
|
||
label: '{{ states[entity].name }}'
|
||
tap_action:
|
||
action: more-info
|
||
entity: binary_sensor.backyard_motion_detect
|
||
header:
|
||
card:
|
||
type: markdown
|
||
text_only: true
|
||
content: |
|
||
# House Alarm
|
||
- type: sections
|
||
max_columns: 4
|
||
title: Gate
|
||
path: gate
|
||
icon: mdi:gate
|
||
sections:
|
||
- type: grid
|
||
cards:
|
||
- type: heading
|
||
heading: Driveway
|
||
heading_style: title
|
||
- show_state: false
|
||
show_name: false
|
||
camera_view: live
|
||
type: picture-entity
|
||
entity: camera.driveway
|
||
grid_options:
|
||
columns: full
|
||
rows: auto
|
||
tap_action:
|
||
action: more-info
|
||
- type: custom:mushroom-lock-card
|
||
name: Open/Close gate
|
||
entity: switch.sthome_ut4_relay_6
|
||
tap_action:
|
||
action: toggle
|
||
header:
|
||
card:
|
||
type: markdown
|
||
text_only: true
|
||
content: >-
|
||
# Gate
|
||
|
||
Open/close driveway gate
|
||
|
||
✨ WORK IN PROGRESS ✨
|
||
|
||
<span style="color:red"><b>⚠️WARNING: Make double sure that there are
|
||
no obstructions before opening or closing the gate!⚠️ If the clock has
|
||
stopped, it means that the screen is not updating. ⚠️ Refresh your
|
||
browser and ensure you are getting a live stream before
|
||
opening/closing gate!⚠️</b></span>
|
||
badges:
|
||
- type: custom:mushroom-template-badge
|
||
content: '{{ ''Locked'' if states(entity) == ''on'' else ''Unlocked'' }}'
|
||
icon: |-
|
||
{% set state = states(entity) %}
|
||
{% if state == 'on' %}
|
||
mdi:gate
|
||
{% elif state == 'off' %}
|
||
mdi:gate-alert
|
||
{% else %}
|
||
mdi:gate-alert
|
||
{% endif %}
|
||
color: |-
|
||
{% set state = states(entity) %}
|
||
{% if state == 'on' %}
|
||
red
|
||
{% elif state == 'off' %}
|
||
green
|
||
{% else %}
|
||
orange
|
||
{% endif %}
|
||
label: Gate
|
||
tap_action:
|
||
action: more-info
|
||
entity: binary_sensor.gate_lock
|