Fix motion sensor dashboards

This commit is contained in:
2022-06-11 16:46:22 +03:00
parent 85b6d36f70
commit 28b3dda4d9
5 changed files with 15 additions and 25 deletions
@@ -47,19 +47,13 @@ card:
entity: sensor.average_humidity
- type: custom:button-card
template: v3_badge_icon
entity: sensor.active_motion_sensors
entity: group.all_motion_sensors
icon: |
[[[
return entity.state === 0 ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor';
return entity.state === 'off' ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor';
]]]
state:
- value: 0
operator: '!='
styles:
card:
- background-color: 'white'
icon:
- color: var(--primary-color)
tap_action:
action: more-info
- type: custom:button-card
template: v3_badge_icon
entity: sensor.open_window_count
@@ -54,11 +54,13 @@ card:
entity: sensor.average_humidity
- type: custom:button-card
template: v3_badge_icon
entity: sensor.active_motion_sensors
entity: group.all_motion_sensors
icon: |
[[[
return entity.state === 0 ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor';
return entity.state === 'off' ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor';
]]]
tap_action:
action: more-info
state:
- value: 0
operator: '!='
@@ -34,19 +34,11 @@ card:
- background-image: url("/local/images/people/maya.jpg")
- type: custom:button-card
template: v3_badge_icon
entity: sensor.active_motion_sensors
entity: group.all_motion_sensors
icon: |
[[[
return entity.state === 0 ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor';
return entity.state === 'off' ? 'mdi:motion-sensor-off' : 'mdi:motion-sensor';
]]]
state:
- value: 0
operator: '!='
styles:
card:
- background-color: 'white'
icon:
- color: var(--primary-color)
- type: custom:button-card
template: v3_badge_icon
entity: sensor.open_window_count
@@ -54,6 +46,8 @@ card:
[[[
return entity.state === 0 ? 'mdi:window-closed' : 'mdi:window-open';
]]]
tap_action:
action: more-info
state:
- value: 0
operator: '!='
+2 -2
View File
@@ -162,7 +162,7 @@ media_player.nvidia_shield: &nvidia_shield
media_player.living_room_tv: *nvidia_shield
sensor.active_motion_sensors:
group.all_motion_sensors:
title: Active motion sensors
card:
type: vertical-stack
@@ -178,7 +178,7 @@ sensor.active_motion_sensors:
- margin-left: 8px
- type: custom:button-card
template: [v3_button, v3_popup_button]
entity: binary_sensor.trisensor_home_security_motion_detection
entity: binary_sensor.hallway_motion_2_occupancy
name: Hallway
- type: custom:button-card
template: [v3_button, v3_popup_button]
+1 -1
View File
@@ -3,9 +3,9 @@ group:
name: All motion_sensors
entities:
- binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy
- binary_sensor.kitchen_motion_occupancy
- binary_sensor.multisensor_motion
- binary_sensor.trisensor_home_security_motion_detection
hallway_motion:
name: Hallway Motion