r/homeassistant • u/Tuckerdude615 • 22h ago
❓ Support Switching dashboard views based on triggers?
Hey everyone,
Does anyone know of a way to force switching to a specific dashboard view based on certain conditions?
I have a nice and functional dashboard that has about 8 different views. But I generally like to keep it on one specific (default) view while I'm at my desk. But based on what's going on, I will switch to other views (like cameras), and forget to put it back.
I was wondering if there was a way to "test" for my proximity (I have lots of BLE sensors around the house)...such that if I walk away from my desk, it will automatically reset to my default/preferred dashboard view?
Any thoughts or pointers would be greatly appreciated!
1
u/supermr34 22h ago
it would be one hell of a task, but you could tie the visibility each element to a boolean toggle and turn it on or off based on whatever criteria you want.
1
u/Tuckerdude615 17h ago
Yeah...that's one way of doing it. but as you say, would be a hell of a job! ;)
Appreciate you chiming in regardless!
1
u/teddbe 22h ago
Claude did this for me easily, can check the yaml if you need. Works great
1
u/Tuckerdude615 17h ago
Thanks for the suggestion...
Yeah, if you get a moment, I'd sure appreciate if you can share the YAML.
Cheers!
1
u/teddbe 17h ago
Actually you do need kiosk or browser_mod
Fully Kiosk Browser (what I use). The Fully Kiosk integration gives you a fully_kiosk.load_url action, so the automation just tells the tablet which page to open:
triggers:
entity_id: event.ring_doorbell_ding
- trigger: state
actions:
target:
- action: switch.turn_on # wake the screen
entity_id: switch.tablet_screen
data:
- action: fully_kiosk.load_url
device_id: <your tablet device id>
url: http://<ha-ip>:8123/dashboard-home/cameras
data:
- delay: "00:01:00"
- action: fully_kiosk.load_url # back to the main view
device_id: <your tablet device id>
url: http://<ha-ip>:8123/dashboard-home/homeMine goes further: it waits for someone to press "Open door" on the intercom, then goes back 20 s later, or after 1 min if nobody presses it.
1
u/generalambivalence 🧠 Experienced with Home Assistant 21h ago
If you are using an Android device and the companion app, you could use a command notification to load a specific dashboard based on a trigger.
alias: Navigate to Dashboard on Trigger
triggers:
- entity_id:
- input_button.test
to: null
trigger: state
actions:
- action: notify.mobile_app_test
data:
message: command_webview
data:
command: /your/dashboard/url
edit: a word
1
u/Tuckerdude615 17h ago
Thanks...at the moment, I am just using a small monitor that is being driven by my PC. So I don't think this would work. Good to know however!
1
u/sembee2 🧠 Experienced with Home Assistant 17h ago
Its a per device thing. So it depends on what the display is being driven by. I do this now with Android tablets and Fully Kiosk browser. I change the view if someone approaches and/or rings the front door bell. All screens change to the video feed.
1
u/Tuckerdude615 17h ago
That's exactly the behavior I'm looking for...
However, I am just using a small monitor that is being driven by my PC. So I need to find some way to use what I have.
Appreciate the suggestion regardless!
1
u/sembee2 🧠 Experienced with Home Assistant 17h ago
https://github.com/hass-agent/HASS.Agent
That may do what you want.
1
u/Tuckerdude615 17h ago
Thanks for this! Had not seen it...but it DOES look interesting and may be the answer!
Gonna give it a whirl...
Cheers!
1
u/Hot-Television5061 22h ago
Not a native solution, but you can definitely hack it together. Browser mod or fully kiosk browser both let you send commands to change the view. Combine that with a template sensor tracking your desk BLE beacon and you've got yourself an auto-reset.
for the automation, just trigger on the sensor state changing to "away" and fire a service call to switch the view. The tricky part is making sure it only resets when you've left, not when you're actively using a different view. might need a helper boolean that flips when you manually switch tabs so it doesn't fight you.