Add dynamic person-based dashboard with auto-updating conditional cards

This commit is contained in:
2025-12-31 00:42:59 +11:00
parent 4dfd9ab95a
commit bf78c9ba26

View File

@@ -0,0 +1,529 @@
################################################################################
# Dynamic Person-Based Device Control Dashboard
# Automatically groups devices by assigned person
# Updates in real-time when device assignments change
################################################################################
title: Family Device Control
views:
- title: Overview
path: overview
icon: mdi:account-group
cards:
# Summary Card
- type: markdown
content: |
# 👨‍👩‍👧‍👦 Family Device Control
**Quick Stats:**
- Bella: {{ states('sensor.bella_device_count') }} devices
- Xander: {{ states('sensor.xander_device_count') }} devices
- William: {{ states('sensor.william_device_count') }} devices
- Jess: {{ states('sensor.jess_device_count') }} devices
- Rob: {{ states('sensor.rob_device_count') }} devices
- System: {{ states('sensor.system_device_count') }} devices
# Master Controls
- type: entities
title: 🚨 Quick Block Controls
show_header_toggle: false
entities:
- entity: input_boolean.block_bella_all
name: Block ALL Bella's Devices
icon: mdi:account-cancel
- entity: input_boolean.block_xander_all
name: Block ALL Xander's Devices
icon: mdi:account-cancel
- entity: input_boolean.block_william_all
name: Block ALL William's Devices
icon: mdi:account-cancel
- entity: input_boolean.block_jess_all
name: Block ALL Jess's Devices
icon: mdi:account-cancel
- entity: input_boolean.block_rob_all
name: Block ALL Rob's Devices
icon: mdi:account-cancel
- entity: input_boolean.block_system_all
name: Block ALL System Devices
icon: mdi:server-network-off
# Bella's Devices Tab
- title: Bella
path: bella
icon: mdi:account-child
cards:
- type: vertical-stack
cards:
# Person-level control
- type: entities
title: 👧 Bella - Master Control
show_header_toggle: false
entities:
- entity: input_boolean.block_bella_all
name: Block All Bella's Devices
icon: mdi:account-cancel
- type: divider
- entity: sensor.bella_device_count
name: Total Devices Assigned
icon: mdi:counter
# Bella's Phone
- type: conditional
conditions:
- entity: input_select.device_owner_bella_phone
state: "Bella"
card:
type: entities
title: 📱 Bella's Phone
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_bella_phone
name: Internet Access
icon: mdi:cellphone
tap_action:
action: toggle
- entity: input_text.mac_bella_phone
name: MAC Address
icon: mdi:network
- entity: input_select.device_owner_bella_phone
name: Assign To
icon: mdi:account-arrow-right
# Bella's Tablet
- type: conditional
conditions:
- entity: input_select.device_owner_bella_tablet
state: "Bella"
card:
type: entities
title: 📱 Bella's Tablet
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_bella_tablet
name: Internet Access
icon: mdi:tablet
tap_action:
action: toggle
- entity: input_text.mac_bella_tablet
name: MAC Address
icon: mdi:network
- entity: input_select.device_owner_bella_tablet
name: Assign To
icon: mdi:account-arrow-right
# Xander's Phone (if assigned to Bella)
- type: conditional
conditions:
- entity: input_select.device_owner_xander_phone
state: "Bella"
card:
type: entities
title: 📱 Xander's Phone (Assigned to Bella)
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_xander_phone
name: Internet Access
icon: mdi:cellphone
- entity: input_select.device_owner_xander_phone
name: Assign To
icon: mdi:account-arrow-right
# Similar conditionals for other devices...
- type: conditional
conditions:
- entity: input_select.device_owner_xander_desktop
state: "Bella"
card:
type: entities
title: 🖥️ Xander's Desktop (Assigned to Bella)
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_xander_desktop
name: Internet Access
- entity: input_select.device_owner_xander_desktop
name: Assign To
- type: conditional
conditions:
- entity: input_select.device_owner_william_phone
state: "Bella"
card:
type: entities
title: 📱 William's Phone (Assigned to Bella)
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_william_phone
name: Internet Access
- entity: input_select.device_owner_william_phone
name: Assign To
- type: conditional
conditions:
- entity: input_select.device_owner_william_laptop
state: "Bella"
card:
type: entities
title: 💻 William's Laptop (Assigned to Bella)
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_william_laptop
name: Internet Access
- entity: input_select.device_owner_william_laptop
name: Assign To
# Xander's Devices Tab
- title: Xander
path: xander
icon: mdi:account
cards:
- type: vertical-stack
cards:
- type: entities
title: 👦 Xander - Master Control
show_header_toggle: false
entities:
- entity: input_boolean.block_xander_all
name: Block All Xander's Devices
icon: mdi:account-cancel
- type: divider
- entity: sensor.xander_device_count
name: Total Devices Assigned
icon: mdi:counter
# Xander's Phone
- type: conditional
conditions:
- entity: input_select.device_owner_xander_phone
state: "Xander"
card:
type: entities
title: 📱 Xander's Phone
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_xander_phone
name: Internet Access
icon: mdi:cellphone
- entity: input_text.mac_xander_phone
name: MAC Address
- entity: input_select.device_owner_xander_phone
name: Assign To
# Xander's Desktop
- type: conditional
conditions:
- entity: input_select.device_owner_xander_desktop
state: "Xander"
card:
type: entities
title: 🖥️ Xander's Desktop
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_xander_desktop
name: Internet Access
icon: mdi:desktop-tower
- entity: input_text.mac_xander_desktop_wifi
name: WiFi MAC
- entity: input_text.mac_xander_desktop_wired
name: Wired MAC
- entity: input_select.device_owner_xander_desktop
name: Assign To
# William's Devices Tab
- title: William
path: william
icon: mdi:account
cards:
- type: vertical-stack
cards:
- type: entities
title: 👨 William - Master Control
show_header_toggle: false
entities:
- entity: input_boolean.block_william_all
name: Block All William's Devices
icon: mdi:account-cancel
- type: divider
- entity: sensor.william_device_count
name: Total Devices Assigned
icon: mdi:counter
- type: conditional
conditions:
- entity: input_select.device_owner_william_phone
state: "William"
card:
type: entities
title: 📱 William's Phone
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_william_phone
name: Internet Access
- entity: input_text.mac_william_phone
name: MAC Address
- entity: input_select.device_owner_william_phone
name: Assign To
- type: conditional
conditions:
- entity: input_select.device_owner_william_laptop
state: "William"
card:
type: entities
title: 💻 William's Laptop
show_header_toggle: false
state_color: true
entities:
- entity: input_boolean.block_device_william_laptop
name: Internet Access
- entity: input_text.mac_william_laptop_wifi
name: WiFi MAC
- entity: input_text.mac_william_laptop_wired
name: Wired MAC
- entity: input_select.device_owner_william_laptop
name: Assign To
# Jess's Devices Tab
- title: Jess
path: jess
icon: mdi:account
cards:
- type: vertical-stack
cards:
- type: entities
title: 👩 Jess - Master Control
show_header_toggle: false
entities:
- entity: input_boolean.block_jess_all
name: Block All Jess's Devices
icon: mdi:account-cancel
- type: divider
- entity: sensor.jess_device_count
name: Total Devices Assigned
- type: conditional
conditions:
- entity: input_select.device_owner_jess_phone
state: "Jess"
card:
type: entities
title: 📱 Jess's Phone
state_color: true
entities:
- entity: input_boolean.block_device_jess_phone
name: Internet Access
- entity: input_text.mac_jess_phone
name: MAC Address
- entity: input_select.device_owner_jess_phone
name: Assign To
- type: conditional
conditions:
- entity: input_select.device_owner_jess_laptop
state: "Jess"
card:
type: entities
title: 💻 Jess's Laptop
state_color: true
entities:
- entity: input_boolean.block_device_jess_laptop
name: Internet Access
- entity: input_text.mac_jess_laptop_wifi
name: WiFi MAC
- entity: input_text.mac_jess_laptop_wired
name: Wired MAC
- entity: input_select.device_owner_jess_laptop
name: Assign To
# Rob's Devices Tab
- title: Rob
path: rob
icon: mdi:account
cards:
- type: vertical-stack
cards:
- type: entities
title: 👨 Rob - Master Control
show_header_toggle: false
entities:
- entity: input_boolean.block_rob_all
name: Block All Rob's Devices
icon: mdi:account-cancel
- type: divider
- entity: sensor.rob_device_count
name: Total Devices Assigned
- type: conditional
conditions:
- entity: input_select.device_owner_rob_phone
state: "Rob"
card:
type: entities
title: 📱 Rob's Phone
state_color: true
entities:
- entity: input_boolean.block_device_rob_phone
name: Internet Access
- entity: input_text.mac_rob_phone
name: MAC Address
- entity: input_select.device_owner_rob_phone
name: Assign To
- type: conditional
conditions:
- entity: input_select.device_owner_rob_laptop
state: "Rob"
card:
type: entities
title: 💻 Rob's Laptop
state_color: true
entities:
- entity: input_boolean.block_device_rob_laptop
name: Internet Access
- entity: input_text.mac_rob_laptop_wifi
name: WiFi MAC
- entity: input_text.mac_rob_laptop_wired
name: Wired MAC
- entity: input_select.device_owner_rob_laptop
name: Assign To
# System Devices Tab
- title: System
path: system
icon: mdi:server-network
cards:
- type: vertical-stack
cards:
- type: entities
title: 🖥️ System Devices - Master Control
show_header_toggle: false
entities:
- entity: input_boolean.block_system_all
name: Block All System Devices
- type: divider
- entity: sensor.system_device_count
name: Total Devices Assigned
# All Devices Tab (Management)
- title: All Devices
path: all_devices
icon: mdi:devices
cards:
- type: markdown
content: |
# 📋 Device Management
Use this tab to reassign devices to different people or view all devices at once.
- type: entities
title: 📱 Phones
show_header_toggle: false
entities:
- type: section
label: Bella's Phone
- entity: input_select.device_owner_bella_phone
name: Owner
- entity: input_boolean.block_device_bella_phone
name: Blocked
- entity: input_text.mac_bella_phone
name: MAC Address
- type: section
label: Xander's Phone
- entity: input_select.device_owner_xander_phone
name: Owner
- entity: input_boolean.block_device_xander_phone
name: Blocked
- entity: input_text.mac_xander_phone
name: MAC Address
- type: section
label: William's Phone
- entity: input_select.device_owner_william_phone
name: Owner
- entity: input_boolean.block_device_william_phone
name: Blocked
- entity: input_text.mac_william_phone
name: MAC Address
- type: section
label: Jess's Phone
- entity: input_select.device_owner_jess_phone
name: Owner
- entity: input_boolean.block_device_jess_phone
name: Blocked
- entity: input_text.mac_jess_phone
name: MAC Address
- type: section
label: Rob's Phone
- entity: input_select.device_owner_rob_phone
name: Owner
- entity: input_boolean.block_device_rob_phone
name: Blocked
- entity: input_text.mac_rob_phone
name: MAC Address
- type: entities
title: 💻 Computers
show_header_toggle: false
entities:
- type: section
label: Bella's Tablet
- entity: input_select.device_owner_bella_tablet
name: Owner
- entity: input_boolean.block_device_bella_tablet
name: Blocked
- entity: input_text.mac_bella_tablet
name: MAC Address
- type: section
label: Xander's Desktop
- entity: input_select.device_owner_xander_desktop
name: Owner
- entity: input_boolean.block_device_xander_desktop
name: Blocked
- entity: input_text.mac_xander_desktop_wifi
name: WiFi MAC
- entity: input_text.mac_xander_desktop_wired
name: Wired MAC
- type: section
label: William's Laptop
- entity: input_select.device_owner_william_laptop
name: Owner
- entity: input_boolean.block_device_william_laptop
name: Blocked
- entity: input_text.mac_william_laptop_wifi
name: WiFi MAC
- entity: input_text.mac_william_laptop_wired
name: Wired MAC
- type: section
label: Jess's Laptop
- entity: input_select.device_owner_jess_laptop
name: Owner
- entity: input_boolean.block_device_jess_laptop
name: Blocked
- entity: input_text.mac_jess_laptop_wifi
name: WiFi MAC
- entity: input_text.mac_jess_laptop_wired
name: Wired MAC
- type: section
label: Rob's Laptop
- entity: input_select.device_owner_rob_laptop
name: Owner
- entity: input_boolean.block_device_rob_laptop
name: Blocked
- entity: input_text.mac_rob_laptop_wifi
name: WiFi MAC
- entity: input_text.mac_rob_laptop_wired
name: Wired MAC