Added animation to home-assistant mushroom cards

This commit is contained in:
Chris Stuurman 2025-05-04 22:23:29 +02:00
parent f16556dfc0
commit 0cba9eed85
8 changed files with 815 additions and 20 deletions

View File

@ -28,10 +28,7 @@ conditions:
- condition: template - condition: template
value_template: "{{ before_zones | length == 0 }}" value_template: "{{ before_zones | length == 0 }}"
enabled: true enabled: true
# - condition: template - alias: Object is in Back Yard
# value_template: "{{ trigger.payload_json[\"after\"][\"entered_zones\"]|length > 0 }}"
# enabled: true
- alias: Object is in Backyard
condition: template condition: template
value_template: "{{ [\"backyard_z1\"] | select(\"in\", after_zones) | list | length > 0 }}" value_template: "{{ [\"backyard_z1\"] | select(\"in\", after_zones) | list | length > 0 }}"
enabled: true enabled: true
@ -40,10 +37,26 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: frigate-event id: frigate-event
- condition: or
conditions:
- condition: template
value_template: "{{ trigger.payload_json[\"before\"][\"stationary\"] != 'true' }}"
- condition: template
value_template: "{{ trigger.payload_json[\"after\"][\"stationary\"] != 'true' }}"
alias: Object is moving
sequence: sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.backyard_motion_detected
alias: Set Backyard motion detected
- action: script.person_detect_actions - action: script.person_detect_actions
alias: Trigger alarm and send critical priority event to devices
data: data:
send_to_sm_n986b: "true" send_to_sm_n986b: "true"
send_to_sm_x115: "true"
send_to_nokia_c20: "true"
send_to_nova_4k: "false" send_to_nova_4k: "false"
id: "{{ id }}" id: "{{ id }}"
title: >- title: >-
@ -59,7 +72,7 @@ actions:
importance: max importance: max
priority: critical priority: critical
image: /api/frigate/notifications/{{ id }}/snapshot.jpg image: /api/frigate/notifications/{{ id }}/snapshot.jpg
video: "" video: null
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
@ -72,11 +85,16 @@ actions:
trigger: mqtt trigger: mqtt
continue_on_timeout: false continue_on_timeout: false
timeout: "00:02:00" timeout: "00:02:00"
alias: 2 min timeout
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}" value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
alias: Wait for end event
- action: script.person_detect_actions - action: script.person_detect_actions
alias: Send high priority notification to devices
data: data:
send_to_sm_n986b: "true" send_to_sm_n986b: "true"
send_to_sm_x115: "true"
send_to_nokia_c20: "true"
send_to_nova_4k: "false" send_to_nova_4k: "false"
id: "{{ id }}" id: "{{ id }}"
title: > title: >
@ -102,9 +120,16 @@ actions:
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.backyard_motion_detected
alias: Reset Backyard motion detected
until: until:
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}" value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}"
alias: End event is detected
default: [] default: []
mode: parallel mode: parallel
max: 10 max: 10

View File

@ -30,21 +30,35 @@ conditions:
enabled: true enabled: true
- alias: Object is in Street or Front Yard - alias: Object is in Street or Front Yard
condition: template condition: template
value_template: "{{ [\"driveway_z1\", \"Driveway_Paving\"] | select(\"in\", after_zones) | list | length > 0 }}" value_template: >-
enabled: true {{ ["driveway_z1", "Driveway_Paving"] | select("in", after_zones) | list |
- alias: Object is not a Car length > 0 }}
condition: template
value_template: "{{ trigger.payload_json[\"after\"][\"label\"] != 'car' }}"
enabled: true enabled: true
actions: actions:
- choose: - choose:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: frigate-event id: frigate-event
- condition: or
conditions:
- condition: template
value_template: "{{ trigger.payload_json[\"before\"][\"stationary\"] != 'true' }}"
- condition: template
value_template: "{{ trigger.payload_json[\"after\"][\"stationary\"] != 'true' }}"
alias: Object is moving
sequence: sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.driveway_motion_detected
alias: Set Driveway motion detected
- action: script.person_detect_actions - action: script.person_detect_actions
alias: Trigger alarm and send critical priority event to devices
data: data:
send_to_sm_n986b: "true" send_to_sm_n986b: "true"
send_to_sm_x115: "true"
send_to_nokia_c20: "true"
send_to_nova_4k: "false" send_to_nova_4k: "false"
id: "{{ id }}" id: "{{ id }}"
title: >- title: >-
@ -60,7 +74,7 @@ actions:
importance: max importance: max
priority: critical priority: critical
image: /api/frigate/notifications/{{ id }}/snapshot.jpg image: /api/frigate/notifications/{{ id }}/snapshot.jpg
video: "" video: null
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
@ -73,11 +87,16 @@ actions:
trigger: mqtt trigger: mqtt
continue_on_timeout: false continue_on_timeout: false
timeout: "00:02:00" timeout: "00:02:00"
alias: 2 min timeout
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}" value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
alias: Wait for end event
- action: script.person_detect_actions - action: script.person_detect_actions
alias: Send high priority notification to devices
data: data:
send_to_sm_n986b: "true" send_to_sm_n986b: "true"
send_to_sm_x115: "true"
send_to_nokia_c20: "true"
send_to_nova_4k: "false" send_to_nova_4k: "false"
id: "{{ id }}" id: "{{ id }}"
title: > title: >
@ -103,9 +122,16 @@ actions:
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.driveway_motion_detected
alias: Reset Driveway motion detected
until: until:
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}" value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}"
alias: End event is detected
default: [] default: []
mode: parallel mode: parallel
max: 10 max: 10

View File

@ -28,10 +28,7 @@ conditions:
- condition: template - condition: template
value_template: "{{ before_zones | length == 0 }}" value_template: "{{ before_zones | length == 0 }}"
enabled: true enabled: true
# - condition: template - alias: Object is on east side
# value_template: "{{ trigger.payload_json[\"after\"][\"entered_zones\"]|length > 0 }}"
# enabled: true
- alias: Object is on the East side of house
condition: template condition: template
value_template: "{{ [\"eastwall_z1\"] | select(\"in\", after_zones) | list | length > 0 }}" value_template: "{{ [\"eastwall_z1\"] | select(\"in\", after_zones) | list | length > 0 }}"
enabled: true enabled: true
@ -40,10 +37,25 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: frigate-event id: frigate-event
- condition: or
conditions:
- condition: template
value_template: "{{ trigger.payload_json[\"before\"][\"stationary\"] != 'true' }}"
- condition: template
value_template: "{{ trigger.payload_json[\"after\"][\"stationary\"] != 'true' }}"
alias: Object is moving
sequence: sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.eastwall_motion_detected
alias: Set Eastwall motion detected
- action: script.person_detect_actions - action: script.person_detect_actions
data: data:
send_to_sm_n986b: "true" send_to_sm_n986b: "true"
send_to_sm_x115: "true"
send_to_nokia_c20: "true"
send_to_nova_4k: "false" send_to_nova_4k: "false"
id: "{{ id }}" id: "{{ id }}"
title: >- title: >-
@ -59,7 +71,7 @@ actions:
importance: max importance: max
priority: critical priority: critical
image: /api/frigate/notifications/{{ id }}/snapshot.jpg image: /api/frigate/notifications/{{ id }}/snapshot.jpg
video: "" video: null
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
@ -72,11 +84,15 @@ actions:
trigger: mqtt trigger: mqtt
continue_on_timeout: false continue_on_timeout: false
timeout: "00:02:00" timeout: "00:02:00"
alias: 2 min timeout
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}" value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
alias: Wait for end event
- action: script.person_detect_actions - action: script.person_detect_actions
data: data:
send_to_sm_n986b: "true" send_to_sm_n986b: "true"
send_to_sm_x115: "true"
send_to_nokia_c20: "true"
send_to_nova_4k: "false" send_to_nova_4k: "false"
id: "{{ id }}" id: "{{ id }}"
title: > title: >
@ -102,6 +118,12 @@ actions:
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.eastwall_motion_detected
alias: Reset Eastwall motion detected
until: until:
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}" value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}"

View File

@ -49,6 +49,12 @@ actions:
value_template: "{{ trigger.payload_json[\"after\"][\"stationary\"] != 'true' }}" value_template: "{{ trigger.payload_json[\"after\"][\"stationary\"] != 'true' }}"
alias: Object is moving alias: Object is moving
sequence: sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.patio_motion_detected
alias: Set Patio motion detected
- action: script.person_detect_actions - action: script.person_detect_actions
data: data:
send_to_nova_4k: "false" send_to_nova_4k: "false"
@ -110,6 +116,12 @@ actions:
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.patio_motion_detected
alias: Reset Patio motion detected
until: until:
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}" value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}"

View File

@ -28,7 +28,7 @@ conditions:
- condition: template - condition: template
value_template: "{{ before_zones | length == 0 }}" value_template: "{{ before_zones | length == 0 }}"
enabled: true enabled: true
- alias: Object is on West side - alias: Object is on west side
condition: template condition: template
value_template: "{{ [\"westwall_z1\"] | select(\"in\", after_zones) | list | length > 0 }}" value_template: "{{ [\"westwall_z1\"] | select(\"in\", after_zones) | list | length > 0 }}"
enabled: true enabled: true
@ -37,10 +37,25 @@ actions:
- conditions: - conditions:
- condition: trigger - condition: trigger
id: frigate-event id: frigate-event
- condition: or
conditions:
- condition: template
value_template: "{{ trigger.payload_json[\"before\"][\"stationary\"] != 'true' }}"
- condition: template
value_template: "{{ trigger.payload_json[\"after\"][\"stationary\"] != 'true' }}"
alias: Object is moving
sequence: sequence:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.westwall_motion_detected
alias: Set Westwall motion detected
- action: script.person_detect_actions - action: script.person_detect_actions
data: data:
send_to_sm_n986b: "true" send_to_sm_n986b: "true"
send_to_sm_x115: "true"
send_to_nokia_c20: "true"
send_to_nova_4k: "false" send_to_nova_4k: "false"
id: "{{ id }}" id: "{{ id }}"
title: >- title: >-
@ -56,7 +71,7 @@ actions:
importance: max importance: max
priority: critical priority: critical
image: /api/frigate/notifications/{{ id }}/snapshot.jpg image: /api/frigate/notifications/{{ id }}/snapshot.jpg
video: "" video: null
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
@ -69,11 +84,15 @@ actions:
trigger: mqtt trigger: mqtt
continue_on_timeout: false continue_on_timeout: false
timeout: "00:02:00" timeout: "00:02:00"
alias: 2 min timeout
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}" value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
alias: Wait for end event
- action: script.person_detect_actions - action: script.person_detect_actions
data: data:
send_to_sm_n986b: "true" send_to_sm_n986b: "true"
send_to_sm_x115: "true"
send_to_nokia_c20: "true"
send_to_nova_4k: "false" send_to_nova_4k: "false"
id: "{{ id }}" id: "{{ id }}"
title: > title: >
@ -99,6 +118,12 @@ actions:
base_url: https://home-assistant.sthome.org base_url: https://home-assistant.sthome.org
when: "{{ detect_time }}" when: "{{ detect_time }}"
camera: "{{ camera }}" camera: "{{ camera }}"
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.westwall_motion_detected
alias: Reset Westwall motion detected
until: until:
- condition: template - condition: template
value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}" value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}"

View File

@ -1,5 +1,8 @@
# Configure a default setup of Home Assistant (frontend, api, etc) # Configure a default setup of Home Assistant (frontend, api, etc)
default_config: default_config:
frontend:
extra_module_url:
- /local/card-mod.js
# Text to speech # Text to speech
tts: tts:
- platform: google_translate - platform: google_translate
@ -98,7 +101,29 @@ template:
{%- else -%} {%- else -%}
mdi:lock-off mdi:lock-off
{%- endif -%} {%- endif -%}
- unique_id: motion_detected_gui
name: Motion Detected
state: >
{{ 'on' if is_state('input_boolean.backyard_motion_detected', 'on') or is_state('input_boolean.westwall_motion_detected', 'on') or is_state('input_boolean.eastwall_motion_detected', 'on') or is_state('input_boolean.patio_motion_detected', 'on') or is_state('input_boolean.driveway_motion_detected', 'on') else 'off' }}
icon: >
{% if this.state == 'on' %}
mdi:motion-sensor
{% elif this.state == 'off'%}
mdi:motion-sensor-off
{% else %}
mdi:motion-sensor-off
{% endif %}
- unique_id: motion_detect_enabled
name: Motion Detect Enabled
state: "{{ states('input_boolean.person_detect') }}"
icon: >
{% if this.state == 'on' %}
mdi:motion-sensor
{% elif this.state == 'off' %}
mdi:motion-sensor-off
{% else %}
mdi:motion-sensor-off
{% endif %}
#notify: #notify:
# - platform: androidtv # - platform: androidtv
# name: Android TV # name: Android TV

View File

@ -0,0 +1,635 @@
# https://www.youtube.com/watch?v=5Pi21pqfbxA
cards:
- type: vertical-stack
cards:
- text: Physical Switches / Lights
type: custom:text-divider-row
- square: false
columns: 4
type: grid
cards:
- aspect_ratio: 1.2/1
color: rgb(252,255,158)
color_type: icon
entity: switch.kitchen_sink_light
icon: mdi:ceiling-light
name: Kitchen Sink
tap_action:
action: toggle
type: custom:button-card
- aspect_ratio: 1.2/1
color: rgb(252,0,158)
color_type: card
entity: switch.family_room_lamp
icon: mdi:lamp
name: Family Room
tap_action:
action: toggle
type: custom:button-card
- aspect_ratio: 1.2/1
color: rgb(252,255,158)
color_type: card
entity: switch.driveway_lights
icon: mdi:coach-lamp
name: Driveway
tap_action:
action: toggle
type: custom:button-card
- aspect_ratio: 1.2/1
color: rgb(252,255,158)
color_type: card
entity: switch.master_bedroom_lamp
icon: mdi:lamp
name: Master BR
tap_action:
action: toggle
type: custom:button-card
- text: Template (virtual) Switches
type: custom:text-divider-row
- type: grid
square: false
columns: 4
cards:
- aspect_ratio: 1.2/1
color: rgb(0,255,0)
color_type: card
entity: light.basement
show_name: false
show_state: true
state:
- color: rgb(200,0,0)
icon: mdi:lightbulb-off
value: 'off'
type: custom:button-card
- aspect_ratio: 1.2/1
color_type: card
entity: switch.sw_basement_100
icon: mdi:circle-slice-8
name: 100%
state:
- color: rgb(0,128,0)
value: 'on'
type: custom:button-card
- aspect_ratio: 1.2/1
color_type: card
entity: switch.sw_basement_75
icon: mdi:circle-slice-6
name: 75%
state:
- color: rgb(0,75,0)
value: 'on'
type: custom:button-card
- aspect_ratio: 1.2/1
color_type: card
entity: switch.sw_basement_50
icon: mdi:circle-slice-4
name: 50%
state:
- color: rgb(0,50,0)
value: 'on'
type: custom:button-card
- text: Binary Sensors
type: custom:text-divider-row
- square: false
columns: 4
type: grid
cards:
- aspect_ratio: 1.2/1
color: rgb(0,255,0)
color_type: icon
entity: binary_sensor.garage_laundry_door
name: Laundry Door
show_name: true
show_state: false
state:
- color: rgb(255,0,0)
icon: mdi:door
value: 'off'
- color: rgb(0,255,0)
icon: mdi:door-open
styles:
icon:
- animation: blink 2s ease infinite
value: 'on'
type: custom:button-card
- aspect_ratio: 1.2/1
color: rgb(0,255,0)
color_type: icon
entity: binary_sensor.garage_service_door
name: Service Door
show_name: true
show_state: false
state:
- color: rgb(255,0,0)
icon: mdi:door
value: 'off'
- color: rgb(0,255,0)
icon: mdi:door-open
styles:
icon:
- animation: blink 2s ease infinite
value: 'on'
type: custom:button-card
- aspect_ratio: 1.2/1
color: rgb(0,255,0)
color_type: icon
entity: cover.garage_door
name: Garage Door
show_name: false
show_state: true
state:
- color: rgb(255,0,0)
icon: mdi:garage
value: closed
- color: rgb(0,255,0)
icon: mdi:garage-open
styles:
icon:
- animation: blink 2s ease infinite
value: open
type: custom:button-card
- aspect_ratio: 1.2/1
color-type: card
entity: binary_sensor.mailbox_zb
name: Door Status
show_state: true
state:
- color: rgb(128,128,128)
icon: mdi:mailbox-outline
value: 'off'
- color: rgb(0,255,0)
icon: mdi:mailbox-open-up-outline
styles:
icon:
- animation: blink 2s ease infinite
value: 'on'
type: custom:button-card
- text: Input Booleans
type: custom:text-divider-row
- aspect_ratio: 5/1
color_type: card
entity: input_boolean.voice_notifications
name: Voice Notifications - ON
icon: mdi:account-voice
state:
- color: rgb(0,0,255)
value: 'on'
- color: rgb(50,50,50)
icon: mdi:account-voice-off
name: Voice Notifications - OFF
value: 'off'
type: custom:button-card
- square: false
columns: 4
type: grid
cards:
- aspect_ratio: 1.3/1
color: rgb(3, 157, 252)
color_type: card
entity: input_boolean.notify_washer
icon: mdi:account-voice
name: Washer
state:
- color: rgb(70,70,70)
icon: mdi:account-voice-off
value: 'off'
type: custom:button-card
- aspect_ratio: 1.3/1
color: rgb(3, 157, 252)
color_type: card
entity: input_boolean.notify_dryer
icon: mdi:account-voice
name: Dryer
state:
- color: rgb(70,70,70)
icon: mdi:account-voice-off
value: 'off'
type: custom:button-card
- aspect_ratio: 1.3/1
color: rgb(3, 157, 252)
color_type: card
entity: input_boolean.notify_ender3
icon: mdi:account-voice
name: Printer
state:
- color: rgb(70,70,70)
icon: mdi:account-voice-off
value: 'off'
type: custom:button-card
- aspect_ratio: 1.3/1
color: rgb(3, 157, 252)
color_type: card
entity: input_boolean.notify_mail
icon: mdi:account-voice
name: Mail
state:
- color: rgb(70,70,70)
icon: mdi:account-voice-off
value: 'off'
type: custom:button-card
- type: vertical-stack
cards:
- text: Numeric Entities / Sensors
type: custom:text-divider-row
- square: false
columns: 4
type: grid
cards:
- aspect_ratio: 1.2/1
entity: sensor.mailbox_zb_battery
name: Mailbox
show_state: true
state:
- color: rgb(0,255,0)
icon: mdi:battery
operator: '>='
value: 95
- color: rgb(0,255,0)
icon: mdi:battery-90
operator: '>='
value: 85
- color: rgb(0,255,0)
operator: '>='
value: 75
icon: mdi:battery-80
- color: rgb(0,255,0)
operator: '>='
value: 65
icon: mdi:battery-70
- color: rgb(0,255,0)
operator: '>='
value: 55
icon: mdi:battery-60
- color: rgb(0,255,0)
icon: mdi:battery-50
operator: '>='
value: 45
- color: rgb(0,255,0)
icon: mdi:battery-40
operator: '>='
value: 31
- color: rgb(255,255,0)
icon: mdi:battery-30
operator: '>='
value: 25
- color: rgb(255,255,0)
icon: mdi:battery-20
operator: '>='
value: 16
- color: rgb(255,0,0)
icon: mdi:battery-10
operator: <
styles:
icon:
- animation: blink 2s ease infinite
value: 16
type: custom:button-card
- aspect_ratio: 1.2/1
entity: sensor.garage_laundry_door_battery
name: Laundry Door
show_state: true
state:
- color: rgb(0,255,0)
icon: mdi:battery
operator: '>='
value: 95
- color: rgb(0,255,0)
icon: mdi:battery-90
operator: '>='
value: 85
- color: rgb(0,255,0)
operator: '>='
value: 75
icon: mdi:battery-80
- color: rgb(0,255,0)
operator: '>='
value: 65
icon: mdi:battery-70
- color: rgb(0,255,0)
operator: '>='
value: 55
icon: mdi:battery-60
- color: rgb(0,255,0)
icon: mdi:battery-50
operator: '>='
value: 45
- color: rgb(0,255,0)
icon: mdi:battery-40
operator: '>='
value: 31
- color: rgb(255,255,0)
icon: mdi:battery-30
operator: '>='
value: 25
- color: rgb(255,255,0)
icon: mdi:battery-20
operator: '>='
value: 16
- color: rgb(255,0,0)
icon: mdi:battery-10
operator: <
styles:
icon:
- animation: blink 2s ease infinite
value: 16
type: custom:button-card
- aspect_ratio: 1.2/1
entity: sensor.garage_service_door_battery
name: Service Door
show_state: true
state:
- color: rgb(0,255,0)
icon: mdi:battery
operator: '>='
value: 95
- color: rgb(0,255,0)
icon: mdi:battery-90
operator: '>='
value: 85
- color: rgb(0,255,0)
operator: '>='
value: 75
icon: mdi:battery-80
- color: rgb(0,255,0)
operator: '>='
value: 65
icon: mdi:battery-70
- color: rgb(0,255,0)
operator: '>='
value: 55
icon: mdi:battery-60
- color: rgb(0,255,0)
icon: mdi:battery-50
operator: '>='
value: 45
- color: rgb(0,255,0)
icon: mdi:battery-40
operator: '>='
value: 31
- color: rgb(255,255,0)
icon: mdi:battery-30
operator: '>='
value: 25
- color: rgb(255,255,0)
icon: mdi:battery-20
operator: '>='
value: 16
- color: rgb(255,0,0)
icon: mdi:battery-10
operator: <
styles:
icon:
- animation: blink 2s ease infinite
value: 16
type: custom:button-card
- aspect_ratio: 1.2/1
entity: sensor.galaxys10_battery_level
name: Galaxy S10
show_state: true
state:
- color: rgb(0,255,0)
icon: mdi:battery
operator: '>='
value: 95
- color: rgb(0,255,0)
icon: mdi:battery-90
operator: '>='
value: 85
- color: rgb(0,255,0)
operator: '>='
value: 75
icon: mdi:battery-80
- color: rgb(0,255,0)
operator: '>='
value: 65
icon: mdi:battery-70
- color: rgb(0,255,0)
operator: '>='
value: 55
icon: mdi:battery-60
- color: rgb(0,255,0)
icon: mdi:battery-50
operator: '>='
value: 45
- color: rgb(0,255,0)
icon: mdi:battery-40
operator: '>='
value: 31
- color: rgb(255,255,0)
icon: mdi:battery-30
operator: '>='
value: 25
- color: rgb(255,255,0)
icon: mdi:battery-20
operator: '>='
value: 16
- color: rgb(255,0,0)
icon: mdi:battery-10
operator: <
styles:
icon:
- animation: blink 2s ease infinite
value: 16
type: custom:button-card
- text: Navigation
type: custom:text-divider-row
- type: grid
square: false
columns: 4
cards:
- aspect_ratio: 1.2/1
color_type: icon
icon: mdi:theater
name: Entertain.
tap_action:
action: navigate
navigation_path: /lovelace-tablet/home-theater
type: custom:button-card
- aspect_ratio: 1.2/1
color_type: icon
icon: mdi:lightbulb
name: All Lights
tap_action:
action: navigate
navigation_path: /lovelace/all_lights
type: custom:button-card
- aspect_ratio: 1.2/1
color_type: icon
icon: mdi:cast-audio
name: Media
tap_action:
action: navigate
navigation_path: /lovelace-tablet/media-players
type: custom:button-card
- aspect_ratio: 1.2/1
color_type: icon
icon: mdi:video
name: Security
tap_action:
action: navigate
navigation_path: /lovelace-tablet/security
type: custom:button-card
- text: Scripts / Automations / Services
type: custom:text-divider-row
- square: false
columns: 4
type: grid
cards:
- aspect_ratio: 1.7/1
entity_picture: /local/espn.png
name: ESPN
show_entity_picture: true
show_name: true
tap_action:
action: call-service
service: script.espn
type: custom:button-card
- aspect_ratio: 1.7/1
entity_picture: /local/golf.jpg
name: Golf
show_entity_picture: true
show_name: true
tap_action:
action: call-service
service: script.golf
type: custom:button-card
- aspect_ratio: 1.7/1
entity_picture: /local/nfl.jpg
name: NFL
show_entity_picture: true
show_name: true
tap_action:
action: call-service
service: script.nfl
type: custom:button-card
- aspect_ratio: 1.7/1
entity_picture: /local/nhl.jpg
name: NHL
show_entity_picture: true
show_name: true
tap_action:
action: call-service
service: script.nhl
type: custom:button-card
- aspect_ratio: 1.7/1
entity_picture: /local/usa.png
name: USA
show_entity_picture: true
show_name: true
tap_action:
action: call-service
service: script.usa
type: custom:button-card
- aspect_ratio: 1.7/1
entity_picture: /local/history.jpg
name: History
show_entity_picture: true
show_name: true
tap_action:
action: call-service
service: script.history
type: custom:button-card
- aspect_ratio: 1.7/1
entity_picture: /local/paramount.png
name: Paramount
show_entity_picture: true
show_name: true
tap_action:
action: call-service
service: script.paramount
type: custom:button-card
- aspect_ratio: 1.7/1
entity_picture: /local/ifc.png
name: IFC
show_entity_picture: true
show_name: true
tap_action:
action: call-service
service: script.ifc
type: custom:button-card
- type: vertical-stack
cards:
- text: Animation and Styles
type: custom:text-divider-row
- square: false
columns: 4
type: grid
cards:
- type: custom:button-card
entity: sensor.thermostat_current_mode
aspect_ratio: 1.3/1
color_type: icon
name: HVAC - Idle
show_state: false
show_name: true
icon: mdi:fan
color: rgb(128,128,128)
state:
- value: heating
name: HVAC - Heating
styles:
icon:
- animation: rotating 2s linear infinite
- color: rgb(255,0,0)
name:
- color: rgb(255,0,0)
- value: cooling
name: HVAC - Cooling
styles:
icon:
- animation: rotating 2s linear infinite
- color: rgb(0,217,255)
name:
- color: rgb(0,217,255)
- value: 'off'
name: HVAC - OFF
styles:
icon:
- color: rgb(255,255,0)
name:
- color: rgb(255,255,0)
- type: custom:button-card
aspect_ratio: 1.2/1
color: rgb(0,255,0)
color_type: icon
entity: cover.garage_door
name: Garage Door
show_name: true
show_state: false
state:
- color: rgb(255,0,0)
icon: mdi:garage
value: open
- color: rgb(0,255,0)
icon: mdi:garage-open
styles:
icon:
- animation: blink 2s ease infinite
value: closed
- type: custom:button-card
name: Change Background
aspect_ratio: 2/1
extra_styles: |
@keyframes bgswap1 {
0% {
background-image: url("/local/scarlett_home.jpg");
}
25% {
background-image: url("/local/scarlett_away.jpg");
}
50% {
background-image: url("/local/mks_away.jpg");
}
75% {
background-image: url("/local/mks_home.jpg");
}
100% {
background-image: url("/local/scarlett_home.jpg");
}
}
styles:
card:
- animation: bgswap1 10s linear infinite
- background-size: cover
name:
- color: white

View File

@ -6,7 +6,7 @@
"items": [ "items": [
{ {
"id": "enable_person_detect_alarm", "id": "enable_person_detect_alarm",
"name": "Enable Person Detect Alarm", "name": "Person Detect",
"icon": "mdi:run" "icon": "mdi:run"
}, },
{ {
@ -23,6 +23,31 @@
"id": "notify_nokia_c20", "id": "notify_nokia_c20",
"name": "Notify Nokia C20", "name": "Notify Nokia C20",
"icon": "mdi:cellphone-text" "icon": "mdi:cellphone-text"
},
{
"id": "driveway_motion_detected",
"name": "Driveway Motion Detected",
"icon": "mdi:motion-sensor"
},
{
"id": "westwall_motion_detected",
"name": "Westwall Motion Detected",
"icon": "mdi:motion-sensor"
},
{
"id": "backyard_motion_detected",
"name": "Backyard Motion Detected",
"icon": "mdi:motion-sensor"
},
{
"id": "eastwall_motion_detected",
"name": "Eastwall Motion Detected",
"icon": "mdi:motion-sensor"
},
{
"id": "patio_motion_detected",
"name": "Patio Motion Detected",
"icon": "mdi:motion-sensor"
} }
] ]
} }