Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- title: Home Dashboard
- views:
- - title: Home
- path: home
- theme: Rounded
- panel: false
- cards:
- # ── Section 1: Family Presence ───────────────────────────────
- - type: vertical-stack
- cards:
- - type: grid
- columns: 4
- square: false
- cards:
- - type: custom:button-card
- entity: person.ana
- name: Ana
- icon: mdi:account
- tap_action:
- action: more-info
- card_mod:
- style: |
- ha-card {
- border: 3px solid {% if states('person.ana') == 'home' %} green {% else %} red {% endif %};
- border-radius: 15px;
- }
- - type: custom:button-card
- entity: person.leigh
- name: Leigh
- icon: mdi:account
- tap_action:
- action: more-info
- card_mod:
- style: |
- ha-card {
- border: 3px solid {% if states('person.leigh') == 'home' %} green {% else %} red {% endif %};
- border-radius: 15px;
- }
- - type: custom:button-card
- entity: person.grayson
- name: Grayson
- icon: mdi:account
- tap_action:
- action: more-info
- card_mod:
- style: |
- ha-card {
- border: 3px solid {% if states('person.grayson') == 'home' %} green {% else %} red {% endif %};
- border-radius: 15px;
- }
- - type: custom:button-card
- entity: person.scarlett
- name: Scarlett
- icon: mdi:account
- tap_action:
- action: more-info
- card_mod:
- style: |
- ha-card {
- border: 3px solid {% if states('person.scarlett') == 'home' %} green {% else %} red {% endif %};
- border-radius: 15px;
- }
- # ── Section 2: Greeting Title Card ─────────────────────────────
- - type: custom:button-card
- name: >
- [[[
- var hour = new Date().getHours();
- var greeting = hour < 12 ? "Good Morning" : (hour < 18 ? "Good Afternoon" : "Good Evening");
- var last = (states['sensor.last_person_home'] && states['sensor.last_person_home'] !== 'unknown') ? states['sensor.last_person_home'] : "Wolf Family";
- return greeting + ", " + last;
- ]]]
- styles:
- card:
- - font-family: In case of a custom font, otherwise you can remove this line
- - background: none
- - padding: 16px 0
- - '--mdc-ripple-press-opacity': 0
- name:
- - font-size: 32px
- - color: var(--contrast20)
- # ── Section 3: Sensor & Weather Chips ─────────────────────────
- - type: grid
- columns: 5
- square: false
- cards:
- - type: custom:button-card
- entity: weather.home
- name: Weather
- icon: mdi:weather-partly-cloudy
- - type: custom:button-card
- entity: sensor.sun_next_setting
- icon: mdi:weather-sunset-down
- - type: custom:button-card
- entity: sensor.sun_next_rising
- icon: mdi:weather-sunset-up
- - type: custom:button-card
- entity: sensor.bertalstreet_temperature
- icon: mdi:thermometer
- - type: custom:button-card
- entity: sensor.bertalstreet_humidity
- icon: mdi:water-percent
- # ── Section 4: Swipable Graph Card ─────────────────────────────
- - type: custom:swipe-card
- card_width: calc(100% - 48px)
- parameters:
- centeredSlides: true
- slidesPerView: auto
- spaceBetween: 16
- initialSlide: 0
- cards:
- - type: sensor
- entity: sensor.aqara_multi_sensor_woonkamer_temperature
- hours_to_show: 24
- detail: 1
- graph: line
- name: Woonkamer
- icon: none
- card_mod:
- class: graph
- # (Add additional sensor cards here as needed)
- # ── Section 5: Scene Buttons ───────────────────────────────────
- - type: grid
- columns: 4
- square: false
- cards:
- - type: custom:button-card
- icon: mdi:sofa-single
- name: Gezellig
- aspect_ratio: 1/1
- tap_action:
- action: call-service
- service: scene.turn_on
- haptic: medium
- service_data:
- entity_id: scene.gezellig
- styles:
- card:
- - border-radius: 24px
- - background-color: var(--blue)
- icon:
- - color: var(--black)
- # (Copy for additional scene buttons)
- # ── Section 6: Light Cards ─────────────────────────────────────
- - type: grid
- columns: 2
- square: false
- cards:
- # Light Card Example
- - type: custom:button-card
- name: Studeerkamer
- icon: mdi:track-light
- entity: light.studeerkamer_groep
- tap_action:
- action: toggle
- haptic: medium
- hold_action:
- action: more-info
- haptic: medium
- custom_fields:
- slider:
- card:
- type: custom:my-slider-v2
- entity: light.studeerkamer_groep
- colorMode: brightness
- styles:
- container:
- - background: none
- - border-radius: 100px
- - overflow: visible
- card:
- - height: 16px
- - padding: 0 8px
- - background: |
- [[[ if (entity.state == "on") return "linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,1) 100%)"; else return "var(--contrast4)"; ]]]
- track:
- - overflow: visible
- - background: none
- progress:
- - background: none
- thumb:
- - background: |
- [[[ if (entity.state == "on") return "var(--black)"; if (entity.state == "off") return "var(--contrast20)"; else return "var(--contrast8)"; ]]]
- - top: 2px
- - right: '-6px'
- - height: 12px
- - width: 12px
- - border-radius: 100px
- styles:
- grid:
- - grid-template-areas: '"i" "n" "slider"'
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr min-content min-content
- card:
- - background: var(--contrast2)
- - padding: 16px
- - '--mdc-ripple-press-opacity': 0
- icon:
- - width: 24px
- - height: 24px
- - color: var(--contrast8)
- name:
- - font-size: 14px
- - margin: 4px 0 12px 0
- - color: var(--contrast8)
- state:
- - value: 'on'
- styles:
- card:
- - background: var(--yellow)
- icon:
- - color: var(--black)
- name:
- - color: var(--black)
- - value: 'off'
- styles:
- icon:
- - color: var(--contrast20)
- name:
- - color: var(--contrast20)
- # Colored Light Card Example
- - type: custom:button-card
- name: Desk
- icon: '[[[ return entity.attributes.icon ]]]'
- entity: light.desk
- tap_action:
- action: toggle
- haptic: medium
- hold_action:
- action: more-info
- haptic: medium
- custom_fields:
- slider:
- card:
- type: custom:my-slider-v2
- entity: "[[[ return entity.entity_id ]]]"
- colorMode: brightness
- styles:
- container:
- - background: none
- - border-radius: 100px
- - overflow: visible
- card:
- - height: 16px
- - padding: 0 8px
- - background: |
- [[[ if (entity.state == "on") return "linear-gradient(90deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,1) 100%)"; else return "var(--contrast4)"; ]]]
- track:
- - overflow: visible
- - background: none
- progress:
- - background: none
- thumb:
- - background: |
- [[[ if (entity.state == "on") return "var(--black)"; if (entity.state == "off") return "var(--contrast20)"; else return "var(--contrast8)"; ]]]
- - top: 2px
- - right: '-8px'
- - height: 12px
- - width: 12px
- - border-radius: 10px
- styles:
- grid:
- - grid-template-areas: '"i" "n" "slider"'
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr min-content min-content
- card:
- - background: var(--contrast2)
- - padding: 16px
- - '--mdc-ripple-press-opacity': 0
- icon:
- - width: 24px
- - height: 24px
- - color: var(--contrast8)
- name:
- - font-size: 14px
- - margin: 4px 0 12px 0
- - color: var(--contrast8)
- state:
- - value: 'on'
- styles:
- card:
- - background: |
- [[[ var color = entity.attributes?.rgb_color;
- if (entity.state != "on"){
- return 'var(--contrast20)';
- } else if (color){
- return 'rgba(' + color + ')';
- } else {
- return 'var(--yellow)';
- }
- ]]]
- icon:
- - color: var(--black)
- name:
- - color: var(--black)
- - value: 'off'
- styles:
- icon:
- - color: var(--contrast20)
- name:
- - color: var(--contrast20)
- # ── Section 7: Brightness & Temperature Slider ───────────────
- - type: custom:button-card
- name: Helderheid
- custom_fields:
- slider:
- card:
- type: custom:my-slider-v2
- entity: light.actieve_woonkamer_lampen
- colorMode: brightness
- styles:
- container:
- - border-radius: 100px
- - overflow: visible
- - background: none
- card:
- - height: 40px
- - padding: 0 20px
- - background: var(--brightness)
- track:
- - overflow: visible
- - background: none
- progress:
- - background: none
- thumb:
- - background: var(--black)
- - top: 2px
- - right: '-18px'
- - height: 36px
- - width: 36px
- - border-radius: 100px
- styles:
- grid:
- - grid-template-areas: '"n" "slider"'
- - grid-template-columns: 1fr
- - grid-template-rows: min-content min-content
- card:
- - background: var(--brightness-tint)
- - padding: 16px
- - '--mdc-ripple-press-opacity': 0
- name:
- - font-size: 14px
- - margin: 4px 0 12px 0
- - color: var(--contrast20)
- # ── Section 8: Quick Controls ───────────────────────────────
- - type: grid
- columns: 4
- square: false
- cards:
- - type: custom:button-card
- entity: switch.automation_wake_up_1
- name: Wake Up Routine
- icon: mdi:alarm
- size: 15%
- styles:
- card:
- - height: 60px
- grid:
- - grid-template-areas: '"i n s"'
- - grid-template-columns: 15% auto 10%
- - grid-template-rows: min-content
- icon:
- - width: 25px
- - height: 25px
- - type: custom:button-card
- entity: switch.automation_routine_1
- name: Morning Routine
- icon: mdi:coffee
- size: 15%
- styles:
- card:
- - height: 60px
- grid:
- - grid-template-areas: '"i n s"'
- - grid-template-columns: 15% auto 10%
- - grid-template-rows: min-content
- icon:
- - width: 25px
- - height: 25px
- - type: custom:button-card
- entity: switch.automation_leaving_home
- name: Leaving Home
- icon: mdi:exit-run
- size: 15%
- styles:
- card:
- - height: 60px
- grid:
- - grid-template-areas: '"i n s"'
- - grid-template-columns: 15% auto 10%
- - grid-template-rows: min-content
- icon:
- - width: 25px
- - height: 25px
- - type: custom:button-card
- entity: switch.automation_coming_home
- name: Coming Home
- icon: mdi:home-import-outline
- size: 15%
- styles:
- card:
- - height: 60px
- grid:
- - grid-template-areas: '"i n s"'
- - grid-template-columns: 15% auto 10%
- - grid-template-rows: min-content
- icon:
- - width: 25px
- - height: 25px
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement