decluttering_templates:
  menu:
    card:
      type: custom:button-card
      name: '[[name]]'
      icon: '[[icon]]'
      tap_action:
        action: call-service
        service: script.togr
        service_data:
          room: '[[room]]'
      styles:
        icon:
          - color: |
              [[[ if (states['[[room]]'].state == 'on') 
                  return "#FF00FF";
                else return "var(--primary-text-color)";  ]]]
        name:
          - color: |
              [[[ if (states['[[room]]'].state == 'on') 
                  return "#FF00FF";
                else return "var(--primary-text-color)";  ]]]
        card:
          - background-color: |
              [[[ if (states['[[room]]'].state == 'on') 
                  return "#000000";
                else return "var(--ha-card-background)";  ]]]
views:
  - title: Home
    cards:
      - type: vertical-stack
        cards:
          - type: custom:button-card
            name: >
              [[[var d = new Date(); return d.toLocaleTimeString('en-US', {hour:
              '2-digit', minute:'2-digit',hourCycle: 'h23',timeZone:
              'America/Los_Angeles' });]]]
            show_state: false
            show_icon: false
            show_name: true
            color: var(--primary-text-color)
            color_type: card
            triggers_update: all
            styles:
              name:
                - font-family: Roboto
                - font-size: 5em
                - letter-spacing: 0.05em
                - color: var(--primary-text-color)
                - text-align: center;
                - font-weight: bold;
                - margin: none;
              card:
                - background-color: var(--ha-card-background)
                - border: 0px solid white
                - border-radius: 10px
                - box-shadow: none;
                - background: none;
                - padding: 0px !important;
            tap_action:
              action: call-service
              service: input_boolean.toggle
              target:
                entity_id: input_boolean.rlo
          - type: custom:button-card
            name: >
              [[[ var n = new Date(); return n.toLocaleDateString("en-US",
              {day:"numeric",weekday:"short",month:"short",year:"numeric"}); ]]]
            show_state: false
            show_icon: false
            show_name: true
            color: var(--primary-text-color)
            color_type: card
            triggers_update: all
            styles:
              name:
                - font-family: Roboto
                - font-size: 2em
                - letter-spacing: 0.05em
                - color: var(--primary-text-color)
                - text-align: center;
                - font-weight: bold;
                - margin: none;
              card:
                - background-color: var(--ha-card-background)
                - border: 0px solid white
                - border-radius: 10px
                - box-shadow: none;
                - background: none;
                - padding: 0px !important;
            tap_action:
              action: call-service
              service: input_boolean.toggle
              target:
                entity_id: input_boolean.rlo
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rlo
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: horizontal-stack
                  cards:
                    - type: custom:button-card
                      name: Dinner
                      entity: input_boolean.dinner
                      icon: mdi:lightbulb-group
                      tap_action:
                        action: call-service
                        service: input_boolean.toggle
                        service_data:
                          entity_id: input_boolean.dinner
                      state:
                        - value: 'off'
                          icon: mdi:lightbulb-group-off
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          icon: mdi:lightbulb-group
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: light.kitchen_nook_chandelier
                      name: Nook
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      tap_action:
                        action: call-service
                        service: light.toggle
                        service_data:
                          brightness_pct: 50
                        target:
                          entity_id: light.kitchen_nook_chandelier
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: light.kitchen_island_pandants
                      name: Island
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      tap_action:
                        action: call-service
                        service: light.toggle
                        service_data:
                          brightness_pct: 50
                        target:
                          entity_id: light.kitchen_island_pandants
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: light.kitchen_under_counter
                      name: Counter
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      tap_action:
                        action: call-service
                        service: light.toggle
                        service_data:
                          brightness_pct: 50
                        target:
                          entity_id: light.kitchen_under_counter
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: light.top_floor_stairs_recessed_lights
                      name: 3 Stairs
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      tap_action:
                        action: call-service
                        service: light.toggle
                        service_data:
                          brightness_pct: 50
                        target:
                          entity_id: light.top_floor_stairs_recessed_lights
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                - type: horizontal-stack
                  cards:
                    - type: custom:button-card
                      entity: light.master_corner_pendants
                      toggle: true
                      name: Pendant
                      styles:
                        name:
                          - font-size: 80%
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      name: Closed
                      entity: input_boolean.mbblindsclosed
                      icon: mdi:blinds
                      tap_action:
                        action: call-service
                        service: input_boolean.toggle
                        service_data:
                          entity_id: input_boolean.mbblindsclosed
                      state:
                        - value: 'off'
                          styles:
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      name: Top Open
                      entity: input_boolean.mbblindstopopen
                      icon: mdi:blinds-horizontal
                      tap_action:
                        action: call-service
                        service: input_boolean.toggle
                        service_data:
                          entity_id: input_boolean.mbblindstopopen
                      state:
                        - value: 'off'
                          styles:
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      name: Open
                      entity: input_boolean.mbblindsopen
                      icon: mdi:blinds-open
                      tap_action:
                        action: call-service
                        service: input_boolean.toggle
                        service_data:
                          entity_id: input_boolean.mbblindsopen
                      state:
                        - value: 'off'
                          styles:
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: light.front_patio_exterior_sconces
                      name: Yard
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                - type: horizontal-stack
                  cards:
                    - type: custom:button-card
                      entity: light.lower_living_main_recessed
                      name: 1 Main
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      tap_action:
                        action: call-service
                        service: light.toggle
                        service_data:
                          brightness_pct: 20
                        target:
                          entity_id: light.lower_living_main_recessed
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: light.lower_living_room_landing_recessed
                      name: 1 Bar
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      tap_action:
                        action: call-service
                        service: light.toggle
                        service_data:
                          brightness_pct: 20
                        target:
                          entity_id: light.lower_living_room_landing_recessed
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: light.lower_stairs_step_lights
                      name: 1 Stairs
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      tap_action:
                        action: call-service
                        service: light.toggle
                        service_data:
                          brightness_pct: 50
                        target:
                          entity_id: light.lower_stairs_step_lights
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: light.exterior_garage_car_port
                      name: Carport
                      toggle: true
                      styles:
                        name:
                          - font-size: 80%
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - entity: cover.ratgdov25i_18ebc3_door
                      type: custom:button-card
                      tap_action:
                        action: call-service
                        service: button.press
                        service_data:
                          entity_id: button.ratgdov25i_18ebc3_toggle_door
                      icon: mdi:garage
                      name: Garage
                      state:
                        - value: closed
                          icon: mdi:garage
                          name: Garage
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: open
                          icon: mdi:garage-open
                          name: Open
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF00FF'
                            name:
                              - color: '#FF00FF'
                              - font-size: 80%
                        - value: opening
                          icon: mdi:garage-open
                          name: Opening
                          styles:
                            card:
                              - background-color: '#000099'
                            icon:
                              - color: '#FF8C00'
                            name:
                              - color: '#FF8C00'
                              - font-size: 80%
                        - value: closing
                          icon: mdi:garage-open
                          name: Closing
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#00FF00'
                            name:
                              - color: '#00FF00'
                              - font-size: 80%
                - type: horizontal-stack
                  cards:
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_kitchen
                      toggle: true
                      name: Kitchen
                      icon: mdi:volume-high
                      styles:
                        name:
                          - font-size: 80%
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_3rd_floor_tv
                      toggle: true
                      name: 3 TV
                      icon: mdi:volume-high
                      styles:
                        name:
                          - font-size: 80%
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_master
                      toggle: true
                      name: Master
                      icon: mdi:volume-high
                      styles:
                        name:
                          - font-size: 80%
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_media_room
                      toggle: true
                      name: Media
                      icon: mdi:volume-high
                      styles:
                        name:
                          - font-size: 80%
                      state:
                        - value: 'off'
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                    - type: custom:button-card
                      name: Mail
                      entity: input_boolean.newmail
                      icon: mdi:mailbox-open
                      tap_action:
                        action: call-service
                        service: input_boolean.toggle
                        service_data:
                          entity_id: input_boolean.newmail
                      state:
                        - value: 'off'
                          icon: mdi:mailbox-open
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          icon: mdi:mailbox-open-up
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF00FF'
                            name:
                              - color: '#FF00FF'
                              - font-size: 80%
                - type: horizontal-stack
                  cards:
                    - type: custom:button-card
                      name: Travel
                      entity: input_boolean.travel
                      icon: mdi:airplane
                      tap_action:
                        action: call-service
                        service: input_boolean.toggle
                        service_data:
                          entity_id: input_boolean.travel
                      state:
                        - value: 'off'
                          icon: mdi:airplane
                          name: Home
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: 'on'
                          icon: mdi:airplane-alert
                          name: travel
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#00FF00'
                            name:
                              - color: '#00FF00'
                              - font-size: 80%
                    - type: custom:button-card
                      name: Oven
                      entity: sensor.oven_right_operation_state
                      icon: mdi:stove
                      state:
                        - value: Inactive
                          name: Oven Off
                          icon: mdi:stove
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: Heating
                          name: Heating
                          icon: mdi:stove
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#FF9900'
                            name:
                              - color: '#FF9900'
                              - font-size: 80%
                        - value: Ready
                          name: Ready
                          icon: mdi:oven
                          styles:
                            card:
                              - background-color: '#000000'
                            icon:
                              - color: '#FF00FF'
                            name:
                              - color: '#FF00FF'
                              - font-size: 80%
                    - type: custom:button-card
                      name: Wash
                      entity: sensor.front_load_washer_run_state
                      icon: mdi:washing-machine
                      state:
                        - value: '-'
                          icon: mdi:washing-machine-off
                          name: Wash Off
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: Washing
                          icon: mdi:washing-machine
                          name: Wash
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#00FF00'
                            name:
                              - color: '#00FF00'
                              - font-size: 80%
                        - value: Rinsing
                          name: Rinse
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#00FF00'
                            name:
                              - color: '#00FF00'
                              - font-size: 80%
                        - value: Spinning
                          icon: mdi:washing-machine-off
                          name: Spin
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#00FF00'
                            name:
                              - color: '#00FF00'
                              - font-size: 80%
                        - value: Finished
                          icon: mdi:washing-machine-off
                          name: End
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#FF00FF'
                            name:
                              - color: '#FF00FF'
                              - font-size: 80%
                    - type: custom:button-card
                      name: Dryer
                      entity: sensor.dryer_run_state
                      icon: mdi:tumble-dryer
                      state:
                        - value: '-'
                          icon: mdi:tumble-dryer-off
                          name: Dry Off
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: Drying
                          name: Drying
                          icon: mdi:tumble-dryer
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#00FF00'
                            name:
                              - color: '#00FF00'
                              - font-size: 80%
                        - value: Cooling
                          name: Cool
                          icon: mdi:tumble-dryer
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#00FF00'
                            name:
                              - color: '#00FF00'
                              - font-size: 80%
                        - value: Finished
                          icon: mdi:tumble-dryer-alert
                          name: Over
                          styles:
                            card:
                              - background-color: '#FFFF00'
                            icon:
                              - color: '#FF00FF'
                            name:
                              - color: '#FF00FF'
                              - font-size: 80%
                    - type: custom:button-card
                      name: Dish
                      entity: sensor.dishwasher_operation_state
                      icon: mdi:dishwasher
                      state:
                        - value: Inactive
                          name: Dish Off
                          icon: mdi:dishwasher-off
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: var(--primary-text-color)
                            name:
                              - color: var(--primary-text-color)
                              - font-size: 80%
                        - value: Run
                          name: Running
                          icon: mdi:dishwasher
                          styles:
                            card:
                              - background-color: '#000066'
                            icon:
                              - color: '#00FF00'
                            name:
                              - color: '#00FF00'
                              - font-size: 80%
                        - value: Finished
                          name: End
                          icon: mdi:dishwasher
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: '#FF00FF'
                            name:
                              - color: '#FF00FF'
                              - font-size: 80%
                        - value: DelayedStart
                          name: Delay
                          icon: mdi:dishwasher
                          styles:
                            card:
                              - background-color: var(--ha-card-background)
                            icon:
                              - color: '#FFFF00'
                            name:
                              - color: '#FFFF00'
                              - font-size: 80%
                        - value: ActionRequired
                          name: Attn!
                          icon: mdi:dishwasher-alert
                          styles:
                            card:
                              - background-color: '#FFFF00'
                            icon:
                              - color: '#FF00FF'
                            name:
                              - color: '#FF00FF'
                              - font-size: 80%
                - type: horizontal-stack
                  cards:
                    - type: custom:button-card
                      color_type: blank-card
                    - type: custom:button-card
                      color_type: blank-card
                    - type: custom:button-card
                      color_type: blank-card
                    - type: custom:button-card
                      color_type: blank-card
                    - type: custom:button-card
                      color_type: blank-card
      - type: vertical-stack
        cards:
          - type: horizontal-stack
            cards:
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Third
                  - icon: mdi:home-floor-3
                  - room: input_boolean.r3
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Blinds
                  - icon: mdi:blinds-open
                  - room: input_boolean.r3b
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: TV
                  - icon: mdi:television
                  - room: input_boolean.r3tv
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Master
                  - icon: mdi:bed-king
                  - room: input_boolean.rmb
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Weather
                  - icon: mdi:weather-lightning-rainy
                  - room: input_boolean.rw
          - type: horizontal-stack
            cards:
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Second
                  - icon: mdi:home-floor-2
                  - room: input_boolean.r2
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: First
                  - icon: mdi:home-floor-1
                  - room: input_boolean.r1
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Sound
                  - icon: mdi:volume-high
                  - room: input_boolean.rsns
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Cameras
                  - icon: mdi:camera
                  - room: input_boolean.rcam
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Nest
                  - icon: mdi:thermostat
                  - room: input_boolean.rnest
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.r3
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: custom:slider-entity-row
                  entity: light.kitchen_nook_chandelier
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.dining_room_recessed
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.deck_recessed_lights
                  name: Deck Recessed
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.deck_wall_lights
                  name: Deck Wall Lights
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.kitchen_island_pandants
                  name: Island Pendants
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.kitchen_main_recessed
                  name: Kitchen Recessed
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.kitchen_under_counter
                  name: Under Counter
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.great_room_main_recessed
                  name: Living Recessed
                  toggle: true
                - type: entities
                  entities:
                    - entity: climate.nest_kitchen
                - type: media-control
                  entity: media_player.kitchen
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.r3b
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: button
                  entity: scene.mcafee_upstairs_normal
                  show_icon: false
                  show_name: true
                  name: Blinds to Normal Position
                - type: entities
                  entities:
                    - cover.roller_shade_window_1
                    - cover.roller_shade_window_2
                    - cover.roller_shade_window_3
                    - cover.roller_shade_window_4
                    - button.living_room_1_identify
                    - cover.living_room_1_bottom
                    - cover.living_room_1_top
                    - button.living_room_2_identify
                    - cover.living_room_2_bottom
                    - cover.living_room_2_top
                    - button.living_room_3_identify
                    - cover.living_room_3_bottom
                    - cover.living_room_3_top
                    - button.living_room_4_identify
                    - cover.living_room_4_top
                    - button.living_room_5_identify
                    - cover.living_room_5_bottom
                    - cover.living_room_5_top
                    - button.living_room_6_identify
                    - cover.living_room_6_bottom
                    - cover.living_room_6_top
                    - button.nook_1_identify
                    - cover.nook_1_bottom
                    - cover.nook_1_top
                    - button.nook_2_identify
                    - cover.nook_2_bottom
                    - cover.nook_2_top
                    - button.nook_3_identify
                    - cover.nook_3_bottom
                    - cover.nook_3_top
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.r3tv
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: entities
                  entities:
                    - entity: switch.sonos_power_strip_sonos_3rd_floor_tv
                      name: Sonos Power
                - type: horizontal-stack
                  cards:
                    - type: media-control
                      name: Apple TV
                      entity: media_player.living_room
                    - type: media-control
                      name: Audio
                      entity: media_player.marantz_sr6015
                - type: horizontal-stack
                  cards:
                    - type: media-control
                      name: TV
                      entity: media_player.tv_living_room_tv
                    - type: media-control
                      name: Chrome
                      entity: media_player.upstairs_chromecast_2
                - type: horizontal-stack
                  cards:
                    - show_name: true
                      show_icon: true
                      type: button
                      tap_action:
                        action: call-service
                        service: media_player.select_source
                        data:
                          entity_id: media_player.marantz_sr6015
                          source: CD
                      entity: media_player.marantz_sr6015
                      name: Spotify
                      icon: mdi:music
                    - show_name: true
                      show_icon: true
                      type: button
                      tap_action:
                        action: call-service
                        service: media_player.select_source
                        data:
                          entity_id: media_player.marantz_sr6015
                          source: TV Audio
                      entity: media_player.marantz_sr6015
                      name: TV Audio
                      icon: mdi:television
                      show_state: false
                    - show_name: true
                      show_icon: true
                      type: button
                      tap_action:
                        action: call-service
                        service: script.upstairs_tv
                      icon: mdi:television-box
                      name: TV & Lights
                      show_state: false
                - type: media-control
                  entity: media_player.third_floor_tv
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rmb
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: custom:slider-entity-row
                  entity: light.master_corner_pendants
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.master_bed_main_recessed
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.master_entry_lights
                  toggle: true
                - type: entities
                  entities:
                    - entity: climate.nest_master_bedroom
                - type: entities
                  entities:
                    - entity: switch.sonos_power_strip_sonos_master
                      name: Sonos Power
                - type: media-control
                  entity: media_player.master_bedroom
                - type: horizontal-stack
                  cards:
                    - show_name: true
                      show_icon: true
                      type: button
                      tap_action:
                        action: call-service
                        service: scene.turn_on
                        service_data:
                          entity_id: scene.mcafee_master_closed
                      name: Closed
                      icon: mdi:blinds
                    - show_name: true
                      show_icon: true
                      type: button
                      tap_action:
                        action: call-service
                        service: scene.turn_on
                        service_data:
                          entity_id: scene.mcafee_master_top_open
                      name: Top Open
                      icon: mdi:blinds-horizontal
                    - show_name: true
                      show_icon: true
                      type: button
                      tap_action:
                        action: call-service
                        service: scene.turn_on
                        service_data:
                          entity_id: scene.mcafee_master_open
                      name: Open
                      icon: mdi:blinds-open
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.r2
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: custom:slider-entity-row
                  entity: light.hall_front_recessed_lights
                  name: Middle Hall Lights
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.front_patio_exterior_sconces
                  name: Front Patio Sconce
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.front_entry_sconces
                  name: Front Door Sconce
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.front_room_recessed_lights
                  name: Front Recessed Lights
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.middle_hall_back_recessed_lights
                  name: Back Hall Lights
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.entry_recessed_lights
                  name: Front Hall Lights
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.entry_light_fixture
                  toggle: true
                - type: entities
                  entities:
                    - entity: switch.sonos_power_strip_sonos_front_room
                      name: Sonos Power
                - type: media-control
                  entity: media_player.front_living_room
                - type: entities
                  entities:
                    - button.entry_1_identify
                    - cover.entry_1
                    - cover.roller_shade
                    - cover.roller_shade_2
                    - cover.roller_shade_3
                    - button.sophie_1_identify
                    - cover.sophie_1_bottom
                    - cover.sophie_1_top
                    - button.sophie_2_identify
                    - cover.sophie_2_bottom
                    - cover.sophie_2_top
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.r1
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: custom:slider-entity-row
                  entity: light.lower_stairs_step_lights
                  name: Stair Lights
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.lower_hall_recessed
                  name: Hall Lights
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.lower_living_main_recessed
                  name: Main Living
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.lower_living_room_landing_recessed
                  name: Landing Recessed
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.ratgdov25i_18ebc3_light
                  toggle: true
                - type: custom:slider-entity-row
                  entity: light.exterior_garage_car_port
                  toggle: true
                - type: entities
                  entities:
                    - cover.ratgdov25i_18ebc3_door
                - type: entities
                  entities:
                    - entity: switch.sonos_power_strip_sonos_media_room
                      name: Sonos Media Room
                - type: media-control
                  entity: media_player.media_room
                - type: media-control
                  entity: media_player.samsung_85
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rw
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: custom:clock-weather-card
                  entity: weather.forecast_home
                  title: null
                  sun_entity: sun.sun
                  temperature_sensor: sensor.outdoor_temp
                  weather_icon_type: line
                  animated_icon: true
                  forecast_rows: 5
                  locale: en-GB
                  time_pattern: HH:mm
                  time_format: 24
                  date_pattern: ccc, d.MM.yy
                  hide_today_section: false
                  hide_forecast_section: false
                  hide_clock: false
                  hide_date: false
                  hourly_forecast: false
                  use_browser_time: false
                  time_zone: null
                - type: custom:horizon-card
                  title: Sun and Moon
                  moon: true
                  refresh_period: 60
                  fields:
                    sunrise: true
                    sunset: true
                    dawn: false
                    noon: false
                    dusk: false
                    azimuth: false
                    sun_azimuth: false
                    moon_azimuth: false
                    elevation: false
                    sun_elevation: false
                    moon_elevation: false
                    moonrise: true
                    moonset: true
                    moon_phase: true
                  southern_flip: false
                  language: en
                  time_format: language
                  number_format: language
                  debug_level: 0
                - type: entities
                  entities:
                    - entity: sensor.noaa_tides
                      name: NOAA Tides
                    - entity: sensor.noaa_tides
                      type: attribute
                      name: High Tide
                      attribute: high_tide_time
                    - entity: sensor.noaa_tides
                      type: attribute
                      name: High Tide Height
                      attribute: high_tide_height
                    - entity: sensor.noaa_tides
                      type: attribute
                      name: Low Tide
                      attribute: low_tide_time
                    - entity: sensor.noaa_tides
                      type: attribute
                      name: Low Tide Height
                      attribute: low_tide_height
                - type: weather-forecast
                  entity: weather.forecast_home
                  forecast_type: daily
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rsns
                state: 'on'
            card:
              type: vertical-stack
              title: Sonos Power Switches
              cards:
                - type: horizontal-stack
                  cards:
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_3rd_floor_tv
                      toggle: true
                      name: Flr 3 TV
                      styles:
                        name:
                          - font-size: 80%
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_front_room
                      toggle: true
                      name: Front Rm
                      styles:
                        name:
                          - font-size: 80%
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_master
                      toggle: true
                      name: Master
                      styles:
                        name:
                          - font-size: 80%
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_kitchen
                      toggle: true
                      name: Kitchen
                      styles:
                        name:
                          - font-size: 80%
                    - type: custom:button-card
                      entity: switch.sonos_power_strip_sonos_media_room
                      toggle: true
                      name: Media Rm
                      styles:
                        name:
                          - font-size: 80%
                - type: entities
                  entities:
                    - media_player.kitchen
                    - media_player.media_room
                    - media_player.samsung_85
                    - media_player.front_living_room
                    - media_player.master_bedroom
                    - media_player.third_floor_tv
                    - media_player.marantz_sr6015
                    - media_player.tv_living_room_tv
                - type: media-control
                  entity: media_player.kitchen
                - type: media-control
                  entity: media_player.media_room
                - type: media-control
                  entity: media_player.front_living_room
                - type: media-control
                  entity: media_player.third_floor_tv
                - type: media-control
                  entity: media_player.master_bedroom
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rnest
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: entities
                  entities:
                    - entity: climate.nest_kitchen
                - type: entities
                  entities:
                    - entity: climate.nest_entryway
                - type: entities
                  entities:
                    - entity: climate.nest_master_bedroom
                - type: entities
                  entities:
                    - entity: climate.nest_bottom_floor
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rcam
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: picture-entity
                  entity: camera.myrtle_deck
                - type: picture-entity
                  entity: camera.myrtle_front_door
                - type: picture-entity
                  entity: camera.myrtle_front_door_inside
                - type: picture-entity
                  entity: camera.myrtle_front_gate
                - type: picture-entity
                  entity: camera.myrtle_front_walk
                - type: picture-entity
                  entity: camera.myrtle_front_yard
                - type: picture-entity
                  entity: camera.myrtle_garage
                - type: picture-entity
                  entity: camera.myrtle_garage_door
                - type: picture-entity
                  entity: camera.myrtle_ozonenorth
                - type: picture-entity
                  entity: camera.myrtle_ozonesouth
                - type: picture-entity
                  entity: camera.myrtle_parking
                - type: picture-entity
                  entity: camera.myrtle_side_yard
                - type: picture-entity
                  entity: camera.myrtle_sunset
          - type: custom:auto-entities
            padding: 0
            show_empty: false
            card:
              type: entities
            filter:
              include:
                - domain: light
                  state: 'on'
                  options:
                    tap_action:
                      action: toggle
              exclude:
                - entity_id: light.kitchen_nook_chandelier
                - entity_id: light.master_corner_pendants
                - entity_id: light.lower_living_main_recessed
                - entity_id: light.lower_living_room_landing_recessed
                - entity_id: light.front_patio_exterior_sconces
                - entity_id: light.kitchen_island_pandants
                - entity_id: light.kitchen_under_counter
                - entity_id: light.top_floor_stairs_recessed_lights
                - entity_id: light.lower_stairs_step_lights
                - entity_id: light.exterior_garage_car_port
          - type: horizontal-stack
            cards:
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Stats
                  - icon: mdi:help-network
                  - room: input_boolean.rimp
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Switches
                  - icon: mdi:switch
                  - room: input_boolean.rsw
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Scenes
                  - icon: mdi:home-automation
                  - room: input_boolean.rsc
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Temp
                  - icon: mdi:thermometer
                  - room: input_boolean.rtemp
              - type: custom:decluttering-card
                template: menu
                variables:
                  - name: Battery
                  - icon: mdi:battery
                  - room: input_boolean.rbs
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rimp
                state: 'on'
            card:
              type: vertical-stack
              cards:
                - type: entities
                  entities:
                    - entity: sensor.garage_freezer_temperature
                    - entity: sensor.upstairs_freezer_temperature
                    - entity: sensor.upstairs_fridge_temperature
                    - entity: sensor.xero_2457_myrtle_ave_charge
                    - entity: sensor.xero_2457_myrtle_ave_load_power
                    - entity: sensor.xero_2457_myrtle_ave_solar_power
                    - entity: sensor.obihai_phone1_port_last_caller_info
                    - entity: sensor.withings_weight
                    - entity: sensor.withings_fat_mass
                    - entity: sensor.rpm_fat
                    - entity: sensor.withings_steps_today
                - type: custom:auto-entities
                  show_empty: false
                  card:
                    type: entities
                  filter:
                    include:
                      - entity_id: sensor.*battery*
                    exclude:
                      - state: '>50'
                      - entity_id: sensor.kitchen_tablet_battery_state
                      - entity_id: sensor.kristins_iphone*
                      - entity_id: sensor.pixel*
                      - entity_id: sensor.sophie*
                      - entity_id: sensor.stairs*
                      - entity_id: sensor.master*
                      - entity_id: sensor.nook*
                      - entity_id: sensor.living*
                      - entity_id: sensor.xero*
                      - entity_id: sensor.p20*
                  sort:
                    method: friendly_name
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rtemp
                state: 'on'
            card:
              type: entities
              entities:
                - sensor.temp_media_pc_temperature
                - sensor.upstairs_freezer_temperature
                - sensor.upstairs_fridge_temperature
                - sensor.garage_freezer_temperature
                - sensor.mailbox_temperature
                - sensor.nest_bottom_floor_temperature
                - sensor.nest_entryway_temperature
                - sensor.nest_kitchen_temperature
                - sensor.nest_master_bedroom_temperature
                - sensor.upstairs_above_fridge_temperature
                - sensor.temp_internet_closet_temperature
                - sensor.deck_fridge_temperature
                - sensor.media_fridge_temperature
                - weather.forecast_home
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rbs
                state: 'on'
            card:
              type: custom:auto-entities
              card:
                type: entities
                show_empty: true
              filter:
                include:
                  - entity_id: sensor.*battery*
                exclude:
                  - entity_id: sensor.kitchen_tablet_battery_state
                  - entity_id: sensor.kristins_iphone*
                  - entity_id: sensor.pixel*
                  - entity_id: sensor.sophie*
                  - entity_id: sensor.stairs*
                  - entity_id: sensor.master*
                  - entity_id: sensor.nook*
                  - entity_id: sensor.living*
                  - entity_id: sensor.xero*
                  - entity_id: sensor.p20*
              sort:
                method: friendly_name
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rsc
                state: 'on'
            card:
              type: custom:auto-entities
              card:
                type: entities
              filter:
                include:
                  - domain: scene
                    options:
                      tap_action:
                        action: call-service
                        service: scene.turn_on
                        service_data:
                          entity_id: this.entity_id
                exclude:
                  - entity_id: '*elkm1*'
                  - entity_id: '*mcafee_master_left_open*'
          - type: conditional
            conditions:
              - condition: state
                entity: input_boolean.rsw
                state: 'on'
            card:
              type: custom:auto-entities
              card:
                type: entities
              filter:
                include:
                  - device_manufacturer: '*TP*'
                  - device_manufacturer: '*YoLink*'
                exclude:
                  - entity_id: '*led*'
                  - state: unavailable
                  - domain: binary_sensor
                    state: 'off'
                  - entity_id: '*humidity'
                  - entity_id: '*battery'
                  - entity_id: '*temperature'
                  - entity_id: switch.internet_closet
          - type: custom:button-card
            color_type: blank-card
title: RPM
