{ "version": 1, "minor_version": 1, "key": "lovelace.dashboard_sthome", "data": { "config": { "title": "Home", "button_card_templates": { "sensor": { "aspect_ratio": "1.2/1", "show_state": true, "show_icon": true }, "sensor_battery": { "template": "sensor", "icon": "[[[\n if (entity.state < 5) return 'mdi:battery-alert-variant-outline';\n if (entity.state >= 5 && entity.state <15) return 'mdi:battery-10';\n if (entity.state >= 15 && entity.state < 25) return 'mdi:battery-20';\n if (entity.state >= 25 && entity.state < 35) return 'mdi:battery-30';\n if (entity.state >= 35 && entity.state < 45) return 'mdi:battery-40';\n if (entity.state >= 45 && entity.state < 55) return 'mdi:battery-50';\n if (entity.state >= 55 && entity.state < 65) return 'mdi:battery-60';\n if (entity.state >= 65 && entity.state < 75) return 'mdi:battery-70';\n if (entity.state >= 75 && entity.state < 85) return 'mdi:battery-80';\n if (entity.state >= 85 && entity.state < 95) return 'mdi:battery-90';\n if (entity.state >= 95) return 'mdi:battery';\n else return 'mdi:battery-alert-variant-outline';\n]]]\n", "style": [ { "padding": "0px" } ], "styles": { "icon": [ { "color": "[[[\n if (entity.state < 15) return 'red';\n if (entity.state >= 15 && entity.state <25) return 'firebrick';\n if (entity.state >= 25 && entity.state < 55) return 'orange';\n if (entity.state >= 55) return 'green';\n else return 'red';\n]]]\n" } ] } } }, "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') %}\n red\n{% else %}\n #4682B4\n{% endif %}\n", "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 {\n {{ 'animation: clip 2s linear infinite;' if is_state('binary_sensor.motion_detected', 'on') }}\n}\n@keyframes clip {\n 50% { clip-path: polygon(0 0, 61% 0, 66% 100%, 0% 100%); }\n}\n" } } } ], "sections": [ { "type": "grid", "cards": [ { "type": "custom:mushroom-chips-card", "chips": [ { "type": "entity", "entity": "sun.sun" }, { "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" } ] }, { "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" }, { "type": "custom:mushroom-person-card", "entity": "device_tracker.nokia_c20" } ] }, { "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", "primary": "S20 ultra", "secondary": "{{ states['sensor.sm_n986b_battery_level'].state }}%", "entity": "sensor.sm_n986b_battery_level", "icon_color": "{% set state=states['sensor.sm_n986b_battery_level'].state %}\n{% if state|int < 15 %}\n red\n{% elif (state|int > 15 and state|int < 25) %}\n #b22222\n{% elif (state|int > 25 and state|int < 55) %}\n orange\n{% else %}\n green\n{% endif %}", "icon": "{{ state_attr(\"sensor.sm_n986b_battery_level\", \"icon\") }}" }, { "type": "custom:mushroom-template-card", "primary": "Nokia 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 %}\n{% if state|int < 15 %}\n red\n{% elif (state|int > 15 and state|int < 25) %}\n #b22222\n{% elif (state|int > 25 and state|int < 55) %}\n orange\n{% else %}\n green\n{% endif %}", "icon": "{{ state_attr(\"sensor.nokia_c20_battery_level\", \"icon\") }}" }, { "type": "custom:mushroom-template-card", "primary": "A9 tablet", "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 %}\n{% if state|int < 15 %}\n red\n{% elif (state|int > 15 and state|int < 25) %}\n #b22222\n{% elif (state|int > 25 and state|int < 55) %}\n orange\n{% else %}\n green\n{% endif %}", "icon": "{{ state_attr(\"sensor.sm_x115_battery_level\", \"icon\") }}" } ] }, { "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 }}\nsthome 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 %}\n{% if state == 'on' %}\n mdi:motion-sensor\n{% elif state == 'off'%}\n mdi:motion-sensor-off\n{% else %}\n mdi:motion-sensor-off\n{% 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') %}\n green\n{% else %}\n #4682B4\n{% 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') %}\n {{ state_attr(\"input_boolean.notify_sm_n986b\", \"icon\") }}\n{% else %}\n mdi:cellphone-off\n{% endif %}", "primary": "{{ states['input_boolean.notify_sm_n986b'].name }}", "icon_color": "{% if is_state('input_boolean.notify_sm_n986b', 'on') %}\n green\n{% else %}\n #4682B4\n{% 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') %}\n {{ state_attr(\"input_boolean.notify_nokia_c20\", \"icon\") }}\n{% else %}\n mdi:cellphone-off\n{% endif %}", "primary": "{{ states['input_boolean.notify_nokia_c20'].name }}", "icon_color": "{% if is_state('input_boolean.notify_nokia_c20', 'on') %}\n green\n{% else %}\n #4682B4\n{% 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') %}\n {{ state_attr(\"input_boolean.notify_sm_x115\", \"icon\") }}\n{% else %}\n mdi:cellphone-off\n{% endif %}", "primary": "{{ states['input_boolean.notify_sm_x115'].name }}", "icon_color": "{% if is_state('input_boolean.notify_sm_x115', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}" }, { "type": "custom:mushroom-template-card", "secondary": "{{ states['input_boolean.notify_sm_a032f'].state }}", "icon": "{% if is_state('input_boolean.notify_sm_a032f', 'on') %}\n {{ state_attr(\"input_boolean.notify_sm_a032f\", \"icon\") }}\n{% else %}\n mdi:cellphone-off\n{% endif %}", "primary": "{{ states['input_boolean.notify_sm_a032f'].name }}", "icon_color": "{% if is_state('input_boolean.notify_sm_a032f', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}", "tap_action": { "action": "toggle" }, "entity": "input_boolean.notify_sm_a032f" } ], "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) %}\n{% if state == 'on' %}\n mdi:motion-sensor\n{% elif state == 'off' %}\n mdi:motion-sensor-off\n{% else %}\n mdi:motion-sensor-off\n{% 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) %}\n{% if state == 'on' %}\n mdi:motion-sensor\n{% elif state == 'off' %}\n mdi:motion-sensor-off\n{% else %}\n mdi:motion-sensor-off\n{% endif %}" }, { "type": "custom:mushroom-template-badge", "content": "{{ states[entity].state | title }} · {{ states[entity].last_changed | relative_time }}", "icon": "{% set state = states(entity) %}\n{% if state == 'on' %}\n mdi:motion-sensor\n{% elif state == 'off' %}\n mdi:motion-sensor-off\n{% else %}\n mdi:motion-sensor-off\n{% 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) %}\n{% if state == 'on' %}\n mdi:motion-sensor\n{% elif state == 'off' %}\n mdi:motion-sensor-off\n{% else %}\n mdi:motion-sensor-off\n{% 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) %}\n{% if state == 'on' %}\n mdi:motion-sensor\n{% elif state == 'off' %}\n mdi:motion-sensor-off\n{% else %}\n mdi:motion-sensor-off\n{% 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\n" } } }, { "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": 12, "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\nOpen/close driveway gate\n✨ WORK IN PROGRESS ✨\n⚠️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!⚠️" } }, "badges": [ { "type": "custom:mushroom-template-badge", "content": "{{ 'Locked' if states(entity) == 'on' else 'Unlocked' }}", "icon": "{% set state = states(entity) %}\n{% if state == 'on' %}\n mdi:gate\n{% elif state == 'off' %}\n mdi:gate-alert\n{% else %}\n mdi:gate-alert\n{% endif %}", "color": "{% set state = states(entity) %}\n{% if state == 'on' %}\n red\n{% elif state == 'off' %}\n green\n{% else %}\n orange\n{% endif %}", "label": "Gate", "tap_action": { "action": "more-info" }, "entity": "binary_sensor.gate_lock" } ] } ] } } }