Added Zelmique to home-assistant and also script limiting user actions
This commit is contained in:
parent
4021b1962e
commit
c284d29ea0
@ -0,0 +1,95 @@
|
|||||||
|
alias: Action specified device for specified user
|
||||||
|
description: ""
|
||||||
|
sequence:
|
||||||
|
- variables:
|
||||||
|
context_user: >-
|
||||||
|
{% set user_id = context.user_id %} {{ states.person |
|
||||||
|
selectattr('attributes.user_id', '==', user_id) |
|
||||||
|
map(attribute='attributes.friendly_name') | first }}
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ context_user == authorised_user }}"
|
||||||
|
alias: is user excuting script the authorised_user?
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ action_to_perform == 'toggle' }}"
|
||||||
|
alias: is toggle requested?
|
||||||
|
sequence:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ device == 'sm_n986b' }}"
|
||||||
|
alias: is device sm_n986b?
|
||||||
|
sequence:
|
||||||
|
- action: input_boolean.toggle
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.notify_sm_n986b
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ device == 'nokia_c20' }}"
|
||||||
|
alias: is device nokia_c20?
|
||||||
|
sequence:
|
||||||
|
- action: input_boolean.toggle
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.notify_nokia_c20
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ device == 'sm_x115' }}"
|
||||||
|
alias: is device sm_x115?
|
||||||
|
sequence:
|
||||||
|
- action: input_boolean.toggle
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.notify_sm_x115
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ device == 'sm_a032f' }}"
|
||||||
|
alias: is device sm_a032f?
|
||||||
|
sequence:
|
||||||
|
- action: input_boolean.toggle
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.notify_sm_a032f
|
||||||
|
- conditions:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ device == 'sm_a245f' }}"
|
||||||
|
alias: is device sm_a245f?
|
||||||
|
sequence:
|
||||||
|
- action: input_boolean.toggle
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.notify_sm_a245f
|
||||||
|
- conditions:
|
||||||
|
- alias: is device sm_a042f?
|
||||||
|
condition: template
|
||||||
|
value_template: "{{ device == 'sm_a042f' }}"
|
||||||
|
sequence:
|
||||||
|
- action: input_boolean.toggle
|
||||||
|
metadata: {}
|
||||||
|
data: {}
|
||||||
|
target:
|
||||||
|
entity_id: input_boolean.notify_sm_a042f
|
||||||
|
fields:
|
||||||
|
authorised_user:
|
||||||
|
selector:
|
||||||
|
text: null
|
||||||
|
name: Authorised User
|
||||||
|
description: User who is allowed to execute script
|
||||||
|
required: true
|
||||||
|
action_to_perform:
|
||||||
|
selector:
|
||||||
|
text: null
|
||||||
|
name: Action to Perform
|
||||||
|
required: true
|
||||||
|
device:
|
||||||
|
selector:
|
||||||
|
text: null
|
||||||
|
name: Device
|
||||||
|
required: true
|
||||||
@ -1,124 +1,100 @@
|
|||||||
alias: "FRIGATE: Person Detect Logic - Backyard Camera"
|
alias: Action specified device for specified user
|
||||||
description: >-
|
description: ""
|
||||||
This automation is used to send a notification when a person is detected by
|
sequence:
|
||||||
Frigate. It uses the frigate MQTT event stream to trigger the notification and
|
- variables:
|
||||||
includes a snapshot of the detected object. The notification will be sent to
|
context_user: >-
|
||||||
all devices with the specified group and will include a video clip of the
|
{% set user_id = context.user_id %} {{ states.person |
|
||||||
detection if available.
|
selectattr('attributes.user_id', '==', user_id) |
|
||||||
triggers:
|
map(attribute='attributes.friendly_name') | first }}
|
||||||
- topic: homeassistant/events
|
|
||||||
id: frigate-event
|
|
||||||
value_template: "{{ value_json[\"after\"][\"camera\"] }}"
|
|
||||||
variables:
|
|
||||||
after_zones: "{{ trigger.payload_json[\"after\"][\"entered_zones\"] }}"
|
|
||||||
before_zones: "{{ trigger.payload_json[\"before\"][\"entered_zones\"] }}"
|
|
||||||
camera: "{{ trigger.payload_json[\"after\"][\"camera\"] }}"
|
|
||||||
id: "{{ trigger.payload_json[\"after\"][\"id\"] }}"
|
|
||||||
label: "{{ trigger.payload_json[\"after\"][\"label\"] }}"
|
|
||||||
score: "{{ trigger.payload_json[\"after\"][\"score\"] }}"
|
|
||||||
time_clip_start: "{{ trigger.payload_json[\"after\"][\"start_time\"] - 10.0 }}"
|
|
||||||
detect_time: "{{trigger.payload_json[\"after\"][\"start_time\"]|int}}"
|
|
||||||
trigger: mqtt
|
|
||||||
payload: Backyard
|
|
||||||
conditions:
|
|
||||||
- condition: or
|
- condition: or
|
||||||
conditions:
|
conditions:
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ trigger.payload_json['type'] == 'new' }}"
|
value_template: "{{ context_user == authorised_user }}"
|
||||||
|
alias: is user excuting script the authorised_user?
|
||||||
- condition: template
|
- condition: template
|
||||||
value_template: "{{ before_zones | length == 0 }}"
|
value_template: "{{ context_user == 'Chris' }}"
|
||||||
enabled: true
|
alias: is user excuting script the admin user?
|
||||||
- alias: Object is in Back Yard
|
|
||||||
condition: template
|
|
||||||
value_template: "{{ [\"backyard_z1\"] | select(\"in\", after_zones) | list | length > 0 }}"
|
|
||||||
enabled: true
|
|
||||||
- alias: Person detected
|
|
||||||
condition: template
|
|
||||||
value_template: "{{ label == 'person' }}"
|
|
||||||
enabled: true
|
|
||||||
actions:
|
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: template
|
||||||
id: frigate-event
|
value_template: "{{ action_to_perform == 'toggle' }}"
|
||||||
|
alias: is toggle requested?
|
||||||
sequence:
|
sequence:
|
||||||
- action: input_boolean.turn_on
|
- choose:
|
||||||
metadata: {}
|
- conditions:
|
||||||
data: {}
|
- condition: template
|
||||||
target:
|
value_template: "{{ device == 'sm_n986b' }}"
|
||||||
entity_id: input_boolean.backyard_motion_detected
|
alias: is device sm_n986b?
|
||||||
alias: Set Backyard motion detected
|
sequence:
|
||||||
- action: script.person_detect_actions
|
- action: input_boolean.toggle
|
||||||
alias: Trigger alarm and send critical priority event to devices
|
metadata: {}
|
||||||
data:
|
data: {}
|
||||||
id: "{{ id }}"
|
target:
|
||||||
title: >-
|
entity_id: input_boolean.notify_sm_n986b
|
||||||
{{ label }} was detected on {{ camera | replace("_", " ") |
|
- conditions:
|
||||||
title }} camera
|
- condition: template
|
||||||
message: >-
|
value_template: "{{ device == 'nokia_c20' }}"
|
||||||
"{{ label }} detected in the {{ after_zones[0] | replace("_", "
|
alias: is device nokia_c20?
|
||||||
") | title }} zone"
|
sequence:
|
||||||
notifTag: "{{ id }}"
|
- action: input_boolean.toggle
|
||||||
notifIcon: mdi:alarm-light
|
metadata: {}
|
||||||
group: frigate-notification-{{ camera }}
|
data: {}
|
||||||
channel: alarm
|
target:
|
||||||
importance: max
|
entity_id: input_boolean.notify_nokia_c20
|
||||||
priority: critical
|
- conditions:
|
||||||
image: /api/frigate/notifications/{{ id }}/snapshot.jpg
|
- condition: template
|
||||||
video: null
|
value_template: "{{ device == 'sm_x115' }}"
|
||||||
base_url: https://home-assistant.sthome.org
|
alias: is device sm_x115?
|
||||||
when: "{{ detect_time }}"
|
sequence:
|
||||||
camera: "{{ camera }}"
|
- action: input_boolean.toggle
|
||||||
- repeat:
|
metadata: {}
|
||||||
sequence:
|
data: {}
|
||||||
- wait_for_trigger:
|
target:
|
||||||
- topic: homeassistant/events
|
entity_id: input_boolean.notify_sm_x115
|
||||||
payload: "{{ trigger.payload_json[\"after\"][\"id\"] }}"
|
- conditions:
|
||||||
value_template: "{{ value_json[\"after\"][\"id\"] }}"
|
- condition: template
|
||||||
trigger: mqtt
|
value_template: "{{ device == 'sm_a032f' }}"
|
||||||
continue_on_timeout: false
|
alias: is device sm_a032f?
|
||||||
timeout: "00:02:00"
|
sequence:
|
||||||
alias: 2 min timeout
|
- action: input_boolean.toggle
|
||||||
- condition: template
|
metadata: {}
|
||||||
value_template: "{{ wait.trigger.payload_json['type'] == 'end' }}"
|
data: {}
|
||||||
alias: Wait for end event
|
target:
|
||||||
- action: script.person_detect_actions
|
entity_id: input_boolean.notify_sm_a032f
|
||||||
alias: Send high priority notification to devices
|
- conditions:
|
||||||
data:
|
- condition: template
|
||||||
id: "{{ id }}"
|
value_template: "{{ device == 'sm_a245f' }}"
|
||||||
title: >
|
alias: is device sm_a245f?
|
||||||
{% if (wait.trigger.payload_json["after"]["sub_label"] !=
|
sequence:
|
||||||
None) -%} {{
|
- action: input_boolean.toggle
|
||||||
(wait.trigger.payload_json["after"]["sub_label"]) | title
|
metadata: {}
|
||||||
}} {%- else -%} {{ label | replace("_", " ") | title }}
|
data: {}
|
||||||
{%- endif %} was detected in the {{ after_zones[0] |
|
target:
|
||||||
replace("_", " ") | title }} zone
|
entity_id: input_boolean.notify_sm_a245f
|
||||||
message: >-
|
- conditions:
|
||||||
Detected with {{ int(score | round(2) * 100) }}%
|
- alias: is device sm_a042f?
|
||||||
confidence
|
condition: template
|
||||||
notifTag: "{{ id }}"
|
value_template: "{{ device == 'sm_a042f' }}"
|
||||||
notifIcon: mdi:cctv
|
sequence:
|
||||||
group: >
|
- action: input_boolean.toggle
|
||||||
frigate-notification-{{
|
metadata: {}
|
||||||
trigger.payload_json["after"]["camera"] }}
|
data: {}
|
||||||
channel: alarm
|
target:
|
||||||
priority: high
|
entity_id: input_boolean.notify_sm_a042f
|
||||||
importance: default
|
fields:
|
||||||
image: /api/frigate/notifications/{{ id }}/snapshot.jpg
|
authorised_user:
|
||||||
video: /api/frigate/notifications/{{ id }}/{{ camera }}/clip.mp4
|
selector:
|
||||||
base_url: https://home-assistant.sthome.org
|
text: null
|
||||||
when: "{{ detect_time }}"
|
name: Authorised User
|
||||||
camera: "{{ camera }}"
|
description: User who is allowed to execute script
|
||||||
until:
|
required: true
|
||||||
- condition: template
|
action_to_perform:
|
||||||
value_template: "{{ wait.trigger.payload_json[\"type\"] == \"end\" }}"
|
selector:
|
||||||
alias: End event is detected
|
text: null
|
||||||
- action: input_boolean.turn_off
|
name: Action to Perform
|
||||||
metadata: {}
|
required: true
|
||||||
data: {}
|
device:
|
||||||
target:
|
selector:
|
||||||
entity_id: input_boolean.backyard_motion_detected
|
text: null
|
||||||
alias: Reset Backyard motion detected
|
name: Device
|
||||||
default: []
|
required: true
|
||||||
mode: parallel
|
|
||||||
max: 10
|
|
||||||
|
|||||||
@ -8,6 +8,7 @@ sequence:
|
|||||||
send_to_sm_x115: "{{ states('input_boolean.notify_sm_x115') == 'on' }}"
|
send_to_sm_x115: "{{ states('input_boolean.notify_sm_x115') == 'on' }}"
|
||||||
send_to_sm_a032f: "{{ states('input_boolean.notify_sm_a032f') == 'on' }}"
|
send_to_sm_a032f: "{{ states('input_boolean.notify_sm_a032f') == 'on' }}"
|
||||||
send_to_sm_a245f: "{{ states('input_boolean.notify_sm_a245f') == 'on' }}"
|
send_to_sm_a245f: "{{ states('input_boolean.notify_sm_a245f') == 'on' }}"
|
||||||
|
send_to_sm_a042f: "{{ states('input_boolean.notify_sm_a042f') == 'on' }}"
|
||||||
send_to_nova_4k: false
|
send_to_nova_4k: false
|
||||||
- parallel:
|
- parallel:
|
||||||
- if:
|
- if:
|
||||||
@ -220,6 +221,48 @@ sequence:
|
|||||||
entity_id: counter.sm_a245f_notification_counter
|
entity_id: counter.sm_a245f_notification_counter
|
||||||
data: {}
|
data: {}
|
||||||
alias: Increment SM_A245F notification counter
|
alias: Increment SM_A245F notification counter
|
||||||
|
- if:
|
||||||
|
- condition: template
|
||||||
|
value_template: "{{ send_to_sm_a042f | default(True) }}"
|
||||||
|
alias: Send to SM_A245F?
|
||||||
|
then:
|
||||||
|
- parallel:
|
||||||
|
- data:
|
||||||
|
message: "{{ message }}"
|
||||||
|
title: "{{ title }}"
|
||||||
|
data:
|
||||||
|
sticky: "true"
|
||||||
|
color: "#2DF56D"
|
||||||
|
channel: "{{ channel }}"
|
||||||
|
vibrationPattern: 100, 1000, 100, 1000, 100
|
||||||
|
priority: "{{ priority }}"
|
||||||
|
ledColor: red
|
||||||
|
importance: "{{ importance }}"
|
||||||
|
clickAction: "{{ image_url }}"
|
||||||
|
tag: "{{ notifTag }}"
|
||||||
|
group: "{{ group }}"
|
||||||
|
image: >-
|
||||||
|
{% if (importance == "default" and video != null) -%} {{
|
||||||
|
null }} {%- else -%} {{ image_url }} {%- endif %}
|
||||||
|
video: >-
|
||||||
|
{% if (importance == "default" and video != null) -%} {{
|
||||||
|
video_url }} {%- else -%} {{ null }} {%- endif %}
|
||||||
|
notification_icon: "{{ notifIcon }}"
|
||||||
|
when: "{{ when }}"
|
||||||
|
actions:
|
||||||
|
- action: URI
|
||||||
|
title: Open Image
|
||||||
|
uri: "{{ image_url }}"
|
||||||
|
- action: URI
|
||||||
|
title: Open Clip
|
||||||
|
uri: "{{ video_url }}"
|
||||||
|
action: notify.mobile_app_sm_a042f
|
||||||
|
alias: "Notify: Send message to SM_A042F"
|
||||||
|
- action: counter.increment
|
||||||
|
target:
|
||||||
|
entity_id: counter.sm_a042f_notification_counter
|
||||||
|
data: {}
|
||||||
|
alias: Increment SM_A042F notification counter
|
||||||
mode: parallel
|
mode: parallel
|
||||||
icon: mdi:bell-ring-outline
|
icon: mdi:bell-ring-outline
|
||||||
max: 10
|
max: 10
|
||||||
|
|||||||
@ -102,6 +102,15 @@
|
|||||||
"restore": true,
|
"restore": true,
|
||||||
"minimum": null,
|
"minimum": null,
|
||||||
"initial": 0
|
"initial": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "sm_a042f_notification_counter",
|
||||||
|
"name": "SM-A042F Notification Counter",
|
||||||
|
"step": 1,
|
||||||
|
"maximum": null,
|
||||||
|
"restore": true,
|
||||||
|
"minimum": null,
|
||||||
|
"initial": 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,12 @@
|
|||||||
"id": "notify_sm_a245f",
|
"id": "notify_sm_a245f",
|
||||||
"name": "Notify SM-A245F",
|
"name": "Notify SM-A245F",
|
||||||
"icon": "mdi:cellphone-text"
|
"icon": "mdi:cellphone-text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "notify_sm_a042f",
|
||||||
|
"name": "Notify SM-A042F",
|
||||||
|
"icon": "mdi:cellphone-text"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -268,6 +268,17 @@
|
|||||||
},
|
},
|
||||||
"entity": "sensor.sm_a245f_battery_level",
|
"entity": "sensor.sm_a245f_battery_level",
|
||||||
"primary": "Carlton (A24)"
|
"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 %}\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_a042f_battery_level', 'icon') }}",
|
||||||
|
"tap_action": {
|
||||||
|
"action": "more-info"
|
||||||
|
},
|
||||||
|
"entity": "sensor.sm_a042f_battery_level",
|
||||||
|
"primary": "Zelmique (A04)"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -631,16 +642,36 @@
|
|||||||
"entity": "input_boolean.notify_sm_n986b",
|
"entity": "input_boolean.notify_sm_n986b",
|
||||||
"secondary": "{{ states[\"input_boolean.notify_sm_n986b\"].state }}",
|
"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 %}",
|
"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 %}",
|
||||||
|
"icon_color": "{% if is_state('input_boolean.notify_sm_n986b', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}",
|
||||||
"primary": "Notify Chris (S20)",
|
"primary": "Notify Chris (S20)",
|
||||||
"icon_color": "{% if is_state('input_boolean.notify_sm_n986b', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}"
|
"tap_action": {
|
||||||
|
"action": "perform-action",
|
||||||
|
"perform_action": "script.specified_user_action",
|
||||||
|
"target": {},
|
||||||
|
"data": {
|
||||||
|
"authorised_user": "Chris",
|
||||||
|
"action_to_perform": "toggle",
|
||||||
|
"device": "sm_n986b"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "custom:mushroom-template-card",
|
"type": "custom:mushroom-template-card",
|
||||||
"entity": "input_boolean.notify_nokia_c20",
|
"entity": "input_boolean.notify_nokia_c20",
|
||||||
"secondary": "{{ states['input_boolean.notify_nokia_c20'].state }}",
|
"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 %}",
|
"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 %}",
|
||||||
|
"icon_color": "{% if is_state('input_boolean.notify_nokia_c20', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}",
|
||||||
"primary": "Notify Zelna (C20)",
|
"primary": "Notify Zelna (C20)",
|
||||||
"icon_color": "{% if is_state('input_boolean.notify_nokia_c20', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}"
|
"tap_action": {
|
||||||
|
"action": "perform-action",
|
||||||
|
"perform_action": "script.specified_user_action",
|
||||||
|
"target": {},
|
||||||
|
"data": {
|
||||||
|
"authorised_user": "Zelna",
|
||||||
|
"action_to_perform": "toggle",
|
||||||
|
"device": "nokia_c20"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "custom:mushroom-template-card",
|
"type": "custom:mushroom-template-card",
|
||||||
@ -648,7 +679,17 @@
|
|||||||
"secondary": "{{ states['input_boolean.notify_sm_x115'].state }}",
|
"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 %}",
|
"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": "Notify Zelna (A9)",
|
"primary": "Notify Zelna (A9)",
|
||||||
"icon_color": "{% if is_state('input_boolean.notify_sm_x115', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}"
|
"icon_color": "{% if is_state('input_boolean.notify_sm_x115', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}",
|
||||||
|
"tap_action": {
|
||||||
|
"action": "perform-action",
|
||||||
|
"perform_action": "script.specified_user_action",
|
||||||
|
"target": {},
|
||||||
|
"data": {
|
||||||
|
"authorised_user": "Zelna",
|
||||||
|
"action_to_perform": "toggle",
|
||||||
|
"device": "sm_x115"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "custom:mushroom-template-card",
|
"type": "custom:mushroom-template-card",
|
||||||
@ -657,20 +698,50 @@
|
|||||||
"primary": "Notify Roderique (A03C)",
|
"primary": "Notify Roderique (A03C)",
|
||||||
"icon_color": "{% if is_state('input_boolean.notify_sm_a032f', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}",
|
"icon_color": "{% if is_state('input_boolean.notify_sm_a032f', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}",
|
||||||
"tap_action": {
|
"tap_action": {
|
||||||
"action": "toggle"
|
"action": "perform-action",
|
||||||
},
|
"perform_action": "script.specified_user_action",
|
||||||
"entity": "input_boolean.notify_sm_a032f"
|
"target": {},
|
||||||
|
"data": {
|
||||||
|
"authorised_user": "Roderique",
|
||||||
|
"action_to_perform": "toggle",
|
||||||
|
"device": "sm_a032f"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "custom:mushroom-template-card",
|
"type": "custom:mushroom-template-card",
|
||||||
"secondary": "{{ states['input_boolean.notify_sm_a245f'].state }}",
|
"secondary": "{{ states['input_boolean.notify_sm_a245f'].state }}",
|
||||||
"icon": "{% if is_state('input_boolean.notify_sm_a245f', 'on') %}\n {{ state_attr(\"input_boolean.notify_sm_a245f\", \"icon\") }}\n{% else %}\n mdi:cellphone-off\n{% endif %}",
|
"icon": "{% if is_state('input_boolean.notify_sm_a245f', 'on') %}\n {{ state_attr(\"input_boolean.notify_sm_a245f\", \"icon\") }}\n{% else %}\n mdi:cellphone-off\n{% endif %}",
|
||||||
"icon_color": "{% if is_state('input_boolean.notify_sm_a245f', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}",
|
"icon_color": "{% if is_state('input_boolean.notify_sm_a245f', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}",
|
||||||
|
"primary": "Notify Carlton (A24)",
|
||||||
"tap_action": {
|
"tap_action": {
|
||||||
"action": "toggle"
|
"action": "perform-action",
|
||||||
},
|
"perform_action": "script.specified_user_action",
|
||||||
"entity": "input_boolean.notify_sm_a245f",
|
"target": {},
|
||||||
"primary": "Notify Carlton (A24)"
|
"data": {
|
||||||
|
"authorised_user": "Carlton",
|
||||||
|
"action_to_perform": "toggle",
|
||||||
|
"device": "sm_a245f"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "custom:mushroom-template-card",
|
||||||
|
"secondary": "{{ states['input_boolean.notify_sm_a042f'].state }}",
|
||||||
|
"icon": "{% if is_state('input_boolean.notify_sm_a042f', 'on') %}\n {{ state_attr(\"input_boolean.notify_sm_a042f\", \"icon\") }}\n{% else %}\n mdi:cellphone-off\n{% endif %}",
|
||||||
|
"icon_color": "{% if is_state('input_boolean.notify_sm_a042f', 'on') %}\n green\n{% else %}\n #4682B4\n{% endif %}",
|
||||||
|
"primary": "Notify Zelmique (A04)",
|
||||||
|
"entity": "input_boolean.notify_sm_a042f",
|
||||||
|
"tap_action": {
|
||||||
|
"action": "perform-action",
|
||||||
|
"perform_action": "script.specified_user_action",
|
||||||
|
"target": {},
|
||||||
|
"data": {
|
||||||
|
"authorised_user": "Zelmique",
|
||||||
|
"action_to_perform": "toggle",
|
||||||
|
"device": "sm_a042f"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"column_span": 1
|
"column_span": 1
|
||||||
|
|||||||
@ -69,9 +69,11 @@ views:
|
|||||||
"#008000" if lc >= 1725 and lc < 3600 }} {{ "#4682B4" if lc >=
|
"#008000" if lc >= 1725 and lc < 3600 }} {{ "#4682B4" if lc >=
|
||||||
3600 and lc < 21600 }}
|
3600 and lc < 21600 }}
|
||||||
content: >-
|
content: >-
|
||||||
{{ states['binary_sensor.motion_detected'].state | title }} · {{
|
{% set motion = is_state('binary_sensor.motion_detected', 'on') %}
|
||||||
|
{% set elapsed_time =
|
||||||
states['binary_sensor.motion_detected'].last_changed |
|
states['binary_sensor.motion_detected'].last_changed |
|
||||||
relative_time }}
|
relative_time %} {{ 'Started' if motion else 'Stopped' }} · {{
|
||||||
|
elapsed_time }} ago
|
||||||
tap_action:
|
tap_action:
|
||||||
action: navigate
|
action: navigate
|
||||||
navigation_path: /dashboard-sthome/alarm
|
navigation_path: /dashboard-sthome/alarm
|
||||||
@ -91,6 +93,8 @@ views:
|
|||||||
chips:
|
chips:
|
||||||
- type: entity
|
- type: entity
|
||||||
entity: sun.sun
|
entity: sun.sun
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
- type: template
|
- type: template
|
||||||
content: >-
|
content: >-
|
||||||
Sunrise {% if states.sun.sun %} {{
|
Sunrise {% if states.sun.sun %} {{
|
||||||
@ -105,6 +109,8 @@ views:
|
|||||||
icon: mdi:weather-sunset-down
|
icon: mdi:weather-sunset-down
|
||||||
- type: entity
|
- type: entity
|
||||||
entity: sensor.moon_phase
|
entity: sensor.moon_phase
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
- show_current: true
|
- show_current: true
|
||||||
show_forecast: true
|
show_forecast: true
|
||||||
type: weather-forecast
|
type: weather-forecast
|
||||||
@ -114,8 +120,13 @@ views:
|
|||||||
- type: custom:mushroom-person-card
|
- type: custom:mushroom-person-card
|
||||||
entity: person.chris
|
entity: person.chris
|
||||||
name: Chris
|
name: Chris
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
- type: custom:mushroom-person-card
|
- type: custom:mushroom-person-card
|
||||||
entity: device_tracker.nokia_c20
|
entity: person.zelna
|
||||||
|
name: Zelna
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
- type: grid
|
- type: grid
|
||||||
cards:
|
cards:
|
||||||
- type: heading
|
- type: heading
|
||||||
@ -182,9 +193,7 @@ views:
|
|||||||
heading: Phones
|
heading: Phones
|
||||||
heading_style: title
|
heading_style: title
|
||||||
- type: custom:mushroom-template-card
|
- type: custom:mushroom-template-card
|
||||||
primary: S20 ultra
|
|
||||||
secondary: '{{ states[''sensor.sm_n986b_battery_level''].state }}%'
|
secondary: '{{ states[''sensor.sm_n986b_battery_level''].state }}%'
|
||||||
entity: sensor.sm_n986b_battery_level
|
|
||||||
icon_color: |-
|
icon_color: |-
|
||||||
{% set state=states['sensor.sm_n986b_battery_level'].state %}
|
{% set state=states['sensor.sm_n986b_battery_level'].state %}
|
||||||
{% if state|int < 15 %}
|
{% if state|int < 15 %}
|
||||||
@ -197,8 +206,13 @@ views:
|
|||||||
green
|
green
|
||||||
{% endif %}
|
{% endif %}
|
||||||
icon: '{{ state_attr("sensor.sm_n986b_battery_level", "icon") }}'
|
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
|
- type: custom:mushroom-template-card
|
||||||
primary: Nokia C20
|
primary: Zelna (C20)
|
||||||
secondary: '{{ states[''sensor.nokia_c20_battery_level''].state }}%'
|
secondary: '{{ states[''sensor.nokia_c20_battery_level''].state }}%'
|
||||||
entity: sensor.nokia_c20_battery_level
|
entity: sensor.nokia_c20_battery_level
|
||||||
icon_color: |-
|
icon_color: |-
|
||||||
@ -213,8 +227,10 @@ views:
|
|||||||
green
|
green
|
||||||
{% endif %}
|
{% endif %}
|
||||||
icon: '{{ state_attr("sensor.nokia_c20_battery_level", "icon") }}'
|
icon: '{{ state_attr("sensor.nokia_c20_battery_level", "icon") }}'
|
||||||
|
tap_action:
|
||||||
|
action: more-info
|
||||||
- type: custom:mushroom-template-card
|
- type: custom:mushroom-template-card
|
||||||
primary: A9 tablet
|
primary: Zelna (A9)
|
||||||
secondary: '{{ states[''sensor.sm_x115_battery_level''].state }}%'
|
secondary: '{{ states[''sensor.sm_x115_battery_level''].state }}%'
|
||||||
entity: sensor.sm_x115_battery_level
|
entity: sensor.sm_x115_battery_level
|
||||||
icon_color: |-
|
icon_color: |-
|
||||||
@ -229,6 +245,62 @@ views:
|
|||||||
green
|
green
|
||||||
{% endif %}
|
{% endif %}
|
||||||
icon: '{{ state_attr("sensor.sm_x115_battery_level", "icon") }}'
|
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
|
- type: grid
|
||||||
cards:
|
cards:
|
||||||
- type: heading
|
- type: heading
|
||||||
@ -247,6 +319,13 @@ views:
|
|||||||
grid_options:
|
grid_options:
|
||||||
columns: 4
|
columns: 4
|
||||||
rows: 1
|
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
|
- type: custom:mushroom-entity-card
|
||||||
entity: counter.sm_x115_notification_counter
|
entity: counter.sm_x115_notification_counter
|
||||||
name: A9 tablet
|
name: A9 tablet
|
||||||
@ -344,7 +423,7 @@ views:
|
|||||||
heading_style: title
|
heading_style: title
|
||||||
icon: mdi:cctv
|
icon: mdi:cctv
|
||||||
- show_state: true
|
- show_state: true
|
||||||
show_name: true
|
show_name: false
|
||||||
camera_view: auto
|
camera_view: auto
|
||||||
type: picture-entity
|
type: picture-entity
|
||||||
entity: camera.driveway
|
entity: camera.driveway
|
||||||
@ -352,7 +431,7 @@ views:
|
|||||||
columns: 12
|
columns: 12
|
||||||
rows: auto
|
rows: auto
|
||||||
- show_state: true
|
- show_state: true
|
||||||
show_name: true
|
show_name: false
|
||||||
camera_view: auto
|
camera_view: auto
|
||||||
type: picture-entity
|
type: picture-entity
|
||||||
entity: camera.patio
|
entity: camera.patio
|
||||||
@ -360,15 +439,16 @@ views:
|
|||||||
columns: 6
|
columns: 6
|
||||||
rows: auto
|
rows: auto
|
||||||
- show_state: true
|
- show_state: true
|
||||||
show_name: true
|
show_name: false
|
||||||
camera_view: auto
|
camera_view: auto
|
||||||
type: picture-entity
|
type: picture-entity
|
||||||
entity: camera.eastwall
|
entity: camera.eastwall
|
||||||
grid_options:
|
grid_options:
|
||||||
columns: 6
|
columns: 6
|
||||||
rows: auto
|
rows: auto
|
||||||
|
aspect_ratio: 1/1
|
||||||
- show_state: true
|
- show_state: true
|
||||||
show_name: true
|
show_name: false
|
||||||
camera_view: auto
|
camera_view: auto
|
||||||
type: picture-entity
|
type: picture-entity
|
||||||
entity: camera.westwall
|
entity: camera.westwall
|
||||||
@ -376,7 +456,7 @@ views:
|
|||||||
columns: 6
|
columns: 6
|
||||||
rows: auto
|
rows: auto
|
||||||
- show_state: true
|
- show_state: true
|
||||||
show_name: true
|
show_name: false
|
||||||
camera_view: auto
|
camera_view: auto
|
||||||
type: picture-entity
|
type: picture-entity
|
||||||
entity: camera.backyard
|
entity: camera.backyard
|
||||||
@ -439,7 +519,7 @@ views:
|
|||||||
entity: counter.backyard_person_alarm_counter
|
entity: counter.backyard_person_alarm_counter
|
||||||
- type: sections
|
- type: sections
|
||||||
max_columns: 10
|
max_columns: 10
|
||||||
subview: true
|
subview: false
|
||||||
path: alarm
|
path: alarm
|
||||||
title: Alarm
|
title: Alarm
|
||||||
icon: mdi:alarm-light
|
icon: mdi:alarm-light
|
||||||
@ -450,7 +530,15 @@ views:
|
|||||||
heading: Settings
|
heading: Settings
|
||||||
heading_style: title
|
heading_style: title
|
||||||
- type: custom:mushroom-template-card
|
- type: custom:mushroom-template-card
|
||||||
icon: '{{ state_attr("binary_sensor.motion_detect_enabled", "icon") }}'
|
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 }}'
|
primary: '{{ states["input_boolean.motion_detect"].name }}'
|
||||||
secondary: '{{ states["input_boolean.motion_detect"].state }}'
|
secondary: '{{ states["input_boolean.motion_detect"].state }}'
|
||||||
icon_color: |-
|
icon_color: |-
|
||||||
@ -462,11 +550,18 @@ views:
|
|||||||
badge_icon: ''
|
badge_icon: ''
|
||||||
badge_color: ''
|
badge_color: ''
|
||||||
entity: input_boolean.motion_detect
|
entity: input_boolean.motion_detect
|
||||||
|
tap_action:
|
||||||
|
action: toggle
|
||||||
- type: custom:mushroom-template-card
|
- type: custom:mushroom-template-card
|
||||||
entity: input_boolean.notify_sm_n986b
|
entity: input_boolean.notify_sm_n986b
|
||||||
secondary: '{{ states["input_boolean.notify_sm_n986b"].state }}'
|
secondary: '{{ states["input_boolean.notify_sm_n986b"].state }}'
|
||||||
icon: '{{ state_attr("input_boolean.notify_sm_n986b", "icon") }}'
|
icon: |-
|
||||||
primary: '{{ states[''input_boolean.notify_sm_n986b''].name }}'
|
{% 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: |-
|
icon_color: |-
|
||||||
{% if is_state('input_boolean.notify_sm_n986b', 'on') %}
|
{% if is_state('input_boolean.notify_sm_n986b', 'on') %}
|
||||||
green
|
green
|
||||||
@ -476,8 +571,13 @@ views:
|
|||||||
- type: custom:mushroom-template-card
|
- type: custom:mushroom-template-card
|
||||||
entity: input_boolean.notify_nokia_c20
|
entity: input_boolean.notify_nokia_c20
|
||||||
secondary: '{{ states[''input_boolean.notify_nokia_c20''].state }}'
|
secondary: '{{ states[''input_boolean.notify_nokia_c20''].state }}'
|
||||||
icon: '{{ state_attr("input_boolean.notify_nokia_c20", "icon") }}'
|
icon: |-
|
||||||
primary: '{{ states[''input_boolean.notify_nokia_c20''].name }}'
|
{% 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: |-
|
icon_color: |-
|
||||||
{% if is_state('input_boolean.notify_nokia_c20', 'on') %}
|
{% if is_state('input_boolean.notify_nokia_c20', 'on') %}
|
||||||
green
|
green
|
||||||
@ -487,14 +587,73 @@ views:
|
|||||||
- type: custom:mushroom-template-card
|
- type: custom:mushroom-template-card
|
||||||
entity: input_boolean.notify_sm_x115
|
entity: input_boolean.notify_sm_x115
|
||||||
secondary: '{{ states[''input_boolean.notify_sm_x115''].state }}'
|
secondary: '{{ states[''input_boolean.notify_sm_x115''].state }}'
|
||||||
icon: '{{ state_attr("input_boolean.notify_sm_x115", "icon") }}'
|
icon: |-
|
||||||
primary: '{{ states[''input_boolean.notify_sm_x115''].name }}'
|
{% 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: |-
|
icon_color: |-
|
||||||
{% if is_state('input_boolean.notify_sm_x115', 'on') %}
|
{% if is_state('input_boolean.notify_sm_x115', 'on') %}
|
||||||
green
|
green
|
||||||
{% else %}
|
{% else %}
|
||||||
#4682B4
|
#4682B4
|
||||||
{% endif %}
|
{% 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
|
column_span: 1
|
||||||
cards: []
|
cards: []
|
||||||
badges:
|
badges:
|
||||||
@ -547,23 +706,6 @@ views:
|
|||||||
show_entity_picture: true
|
show_entity_picture: true
|
||||||
color: orange
|
color: orange
|
||||||
name: Test mode
|
name: Test mode
|
||||||
- type: custom:mushroom-template-badge
|
|
||||||
entity: binary_sensor.motion_detected
|
|
||||||
content: >
|
|
||||||
{{ states['binary_sensor.motion_detected'].state | title }} · {{
|
|
||||||
states['binary_sensor.motion_detected'].last_changed | relative_time
|
|
||||||
}}
|
|
||||||
icon: '{{ state_attr("binary_sensor.motion_detected", "icon") }}'
|
|
||||||
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 }}'
|
|
||||||
- type: custom:mushroom-template-badge
|
- type: custom:mushroom-template-badge
|
||||||
entity: binary_sensor.patio_motion_detect
|
entity: binary_sensor.patio_motion_detect
|
||||||
content: >-
|
content: >-
|
||||||
@ -643,7 +785,6 @@ views:
|
|||||||
action: more-info
|
action: more-info
|
||||||
entity: binary_sensor.eastwall_motion_detect
|
entity: binary_sensor.eastwall_motion_detect
|
||||||
- type: custom:mushroom-template-badge
|
- type: custom:mushroom-template-badge
|
||||||
entity: input_boolean.westwall_motion_detected
|
|
||||||
content: >-
|
content: >-
|
||||||
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
||||||
relative_time }}
|
relative_time }}
|
||||||
@ -668,8 +809,8 @@ views:
|
|||||||
label: '{{ states[entity].name }}'
|
label: '{{ states[entity].name }}'
|
||||||
tap_action:
|
tap_action:
|
||||||
action: more-info
|
action: more-info
|
||||||
|
entity: binary_sensor.westwall_motion_detect
|
||||||
- type: custom:mushroom-template-badge
|
- type: custom:mushroom-template-badge
|
||||||
entity: input_boolean.backyard_motion_detected
|
|
||||||
content: >-
|
content: >-
|
||||||
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
{{ states[entity].state | title }} · {{ states[entity].last_changed |
|
||||||
relative_time }}
|
relative_time }}
|
||||||
@ -694,9 +835,77 @@ views:
|
|||||||
label: '{{ states[entity].name }}'
|
label: '{{ states[entity].name }}'
|
||||||
tap_action:
|
tap_action:
|
||||||
action: more-info
|
action: more-info
|
||||||
|
entity: binary_sensor.backyard_motion_detect
|
||||||
header:
|
header:
|
||||||
card:
|
card:
|
||||||
type: markdown
|
type: markdown
|
||||||
text_only: true
|
text_only: true
|
||||||
content: |
|
content: |
|
||||||
# House Alarm
|
# 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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user