Hi,
I have a yaml lovelace dashboard which is a set of about 12 panels/views
views:
- !include /config/lovelace/panels/s-home.yaml
- !include /config/lovelace/panels/s-study.yaml
- !include /config/lovelace/panels/s-kitchen.yaml
- !include /config/lovelace/panels/s-bedroom.yaml
- !include /config/lovelace/panels/s-sockets.yaml
- !include /config/lovelace/panels/s-lights.yaml
- !include /config/lovelace/panels/s-david.yaml
- !include /config/lovelace/panels/s-batteries.yaml
- !include /config/lovelace/panels/s-heating.yaml
- !include /config/lovelace/panels/s-config.yaml
- !include /config/lovelace/panels/s-entrance.yaml
each view is also an include, and begins with a menu bar (each panel uses the same menu bar include)
title: Home
theme: Github Dark Theme
badges: []
cards:
- type: vertical-stack
cards:
- type: horizontal-stack
cards: !include /config/lovelace/tiles/s-menu.yaml
- type: horizontal-stack
cards: !include /config/lovelace/tiles/home.yaml
- type: horizontal-stack
cards: !include /config/lovelace/tiles/s-footer.yaml
panel: true
The menu buttons currently call the lovelace URL for a specific page, which gives me a way to present different panels.
What i WANT to be able to do is to change the button theme for the selected button when I press it. Remember, all pages are calling the same menu, so that I only have one place to edit it.
I would guess this would be easy enough to do by surrounding each button with a conditional based on the property of an text helper/input_text - however to change that text i’d need to run a script, and I can’t see how to run a script AND call the relevent lovelace url to load the page required. I also can’t see how to call the lovelace URL from a script to allow me to only call the script.
I’m hoping some of you lovelace gurus out there can point me in the right direction. I’ve seen some frankly unbelievable designs out there with conditional content
TIA