If anyone is interested I didn’t really solve the layer show/ hide problem, I went about it another way.
I have a second floorplan which is going to be setup for magic mirror (lcd behind 2 way mirror)
What I wanted was to show a camera feed in the middle of the mirror when I would say “hey google show outside camera”
My solution was to put a black box over the camera feed so that it is hidden, attach a switch to that black box (could have used input_boolean as well) Using CSS class to hide the box so that it reveals the camera feed below it.
Here is my dummy switch, input_boolean would have worked as well.
- platform: command_line
### Camera feed ###
- name: show outside
- state: 'off'
- state: 'on'
display: initial !important;
display: none !important;
Mirror is still work in progress and camera will be outside but you can see the video feed below (excuse mess)
I added a automation via node red that leaves switch on 30 seconds then turns off. also have another dummy switch that “hides outside” that turns off the camera display straight away if needed. that way via voice i can show and hide or just let it hide after 30 seconds.
All thats left now is to fix the camera feed not refreshing in floorplan.