Sorry, just getting back to this. Here’s what I used:
- visible:
- user: xxxx
- user: xxxx
type: custom:grid-layout
title: Front Door Camera
icon: mdi:video-outline
background: center / cover no-repeat url("/local/images/background3.jpg") fixed
path: front_door_camera_front_door_tablet
layout:
grid-template-rows: 80px 640px 80px
grid-template-columns: 93px 1184px
grid-template-areas: '"header header" "buttons main1" "footer footer"'
badges: []
cards:
- type: vertical-stack
cards:
- type: conditional
conditions:
- entity: input_boolean.pool_open
state: 'on'
card:
type: vertical-stack
cards:
- type: custom:button-card
name: Home
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:home
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/main_front_door_tablet
- type: custom:button-card
name: Lights
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:lightbulb
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/lights_front_door_tablet
- type: custom:button-card
name: Cameras
color_type: label-card
color: rgba(7, 103, 215)
icon: mdi:video
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/front_door_camera_front_door_tablet
- type: custom:button-card
name: Media
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:speaker
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/media_front_door_tablet
- type: custom:button-card
name: Pool
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:pool
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/pool_front_door_tablet
- type: custom:button-card
name: Weather
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:weather-partly-cloudy
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/weather_front_door_tablet
- type: custom:button-card
name: Energy
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:flash
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/energy_front_door_tablet
- type: custom:button-card
name: Mail
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:mailbox
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/mail_front_door_tablet
- type: custom:button-card
name: Calendar
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:calendar-clock
styles:
card:
- width: 80px
- height: 72px
tap_action:
action: navigate
navigation_path: /front-door-tablet/calendar_front_door_tablet
- type: conditional
conditions:
- entity: input_boolean.pool_open
state: 'off'
card:
type: vertical-stack
cards:
- type: custom:button-card
name: Home
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:home
styles:
card:
- width: 80px
- height: 80px
tap_action:
action: navigate
navigation_path: /front-door-tablet/main_front_door_tablet
- type: custom:button-card
name: Lights
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:lightbulb
styles:
card:
- width: 80px
- height: 80px
tap_action:
action: navigate
navigation_path: /front-door-tablet/lights_front_door_tablet
- type: custom:button-card
name: Cameras
color_type: label-card
color: rgba(7, 103, 215)
icon: mdi:video
styles:
card:
- width: 80px
- height: 80px
tap_action:
action: navigate
navigation_path: /front-door-tablet/front_door_camera_front_door_tablet
- type: custom:button-card
name: Media
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:speaker
styles:
card:
- width: 80px
- height: 80px
tap_action:
action: navigate
navigation_path: /front-door-tablet/media_front_door_tablet
- type: custom:button-card
name: Weather
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:weather-partly-cloudy
styles:
card:
- width: 80px
- height: 80px
tap_action:
action: navigate
navigation_path: /front-door-tablet/weather_front_door_tablet
- type: custom:button-card
name: Energy
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:flash
styles:
card:
- width: 80px
- height: 80px
tap_action:
action: navigate
navigation_path: /front-door-tablet/energy_front_door_tablet
- type: custom:button-card
name: Mail
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:mailbox
styles:
card:
- width: 80px
- height: 80px
tap_action:
action: navigate
navigation_path: /front-door-tablet/mail_front_door_tablet
- type: custom:button-card
name: Calendar
color_type: label-card
color: rgba(7, 103, 215, 0.24)
icon: mdi:calendar-clock
styles:
card:
- width: 80px
- height: 80px
tap_action:
action: navigate
navigation_path: /front-door-tablet/calendar_front_door_tablet
view_layout:
grid-area: buttons
- type: vertical-stack
cards:
- type: picture-entity
entity: camera.xxxx
name: Front Door
show_name: true
show_state: false
camera_image: camera.xxxx
tap_action:
action: navigate
navigation_path: /front-door-tablet/main_front_door_tablet
aspect_ratio: '1.78'
view_layout:
grid-area: main1
- type: vertical-stack
cards:
- type: horizontal-stack
cards:
- type: custom:button-card
entity: sensor.time_formatted
show_state: true
show_name: false
show_icon: false
name: ''
color_type: label-card
color: rgba(7, 103, 215, 0.00)
styles:
card:
- background-color: rgba(7, 103, 215, 0.00)
- padding: 2%
- box-shadow: none
state:
- color: white
- font-size: 40px
- text-shadow: 0px 0px 3px black
- justify-self: left
tap_action:
action: null
hold_action:
action: null
- type: custom:button-card
entity: sensor.day_date_formatted
show_state: true
show_name: false
show_icon: false
name: ''
color_type: label-card
color: rgba(7, 103, 215, 0.00)
styles:
card:
- background-color: rgba(7, 103, 215, 0.00)
- padding: 2%
- box-shadow: none
state:
- color: white
- font-size: 40px
- text-shadow: 0px 0px 3px black
- justify-self: right
tap_action:
action: null
hold_action:
action: null
view_layout:
grid-area: header
There are two conditional cards that show the entire group of relevant buttons based on whether the pool is open or closed. I’m sure there’s a better way to do that. I also didn’t use any style templates in here, and that’s something I want to get into soon.