Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:button-card
- entity: device_tracker.santa_fe_location
- tap_action:
- action: perform-action
- perform_action: kia_uvo.force_update
- target: {}
- data:
- device_id: bf39ddc2095c08139fc88772fabdd20c
- icon: |
- [[[
- let st = states['device_tracker.santa_fe_location'].state;
- st = st ? st.trim().toLowerCase() : "";
- let icons = {
- "home": "mdi:home",
- "bunnings": "mdi:tools",
- "leisurelink": "mdi:pool",
- "gmhba stadium": "mdi:football-australian",
- "work": "mdi:office-building",
- "aldi": "mdi:cart",
- "town village coles": "mdi:cart",
- "waurn ponds shopping centre": "mdi:cart",
- "coles": "mdi:cart",
- "woolworths": "mdi:cart",
- "chambers": "mdi:scale-balance",
- "court": "mdi:scale-balance"
- };
- return icons[st] || "mdi:map-marker";
- ]]]
- styles:
- grid:
- - grid-template-areas: '"s" "stack"'
- grid-template-columns: auto
- grid-template-rows: auto
- align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- icon:
- - width: 15px
- - color: rgba(255,255,255,0.3)
- - padding-top: 5px
- card:
- - height: 375px
- width: 302.5px
- padding: 10px 0px 20px 0px
- margin: 0px 0px 0px 0px
- align-content: start
- justify-content: start
- align-self: start
- background: transparent
- border-radius: 30px
- border: solid 2px transparent
- box-shadow: 10 10 10 2px transparent
- state:
- - justify-self: start
- align-self: start
- text-align: left
- color: rgba(255,255,255,0.5)
- font-size: 16px
- font-weight: 550
- padding: 5px 0px 0px 15px
- margin: 0px 0px -5px 0px
- show_state: true
- show_name: false
- show_icon: false
- custom_fields:
- stack:
- card:
- type: custom:button-card
- show_state: false
- show_name: true
- show_icon: false
- styles:
- grid:
- - grid-template-areas: '"image" "fuel" "divider" "status"'
- align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- card:
- - background-color: transparent
- padding: 15px 15px 15px 15px
- margin: 0px
- border-radius: 0px
- overflow-y: auto
- custom_fields:
- image:
- - align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- width: 100%
- padding: 0px 0px 10px 0px
- fuel:
- - align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- width: 100%
- padding: 0px 0px 5px 0px
- status:
- - align-content: start
- align-self: start
- justify-content: start
- justify-self: start
- width: 100%
- padding: 0px 0px 0px 0px
- custom_fields:
- image:
- card:
- type: custom:button-card
- entity_picture: >-
- https://media.chromedata.com/MediaGallery/media/MjkzOTU4Xk1lZGlhIEdhbGxlcnk/ZeqTu6EoxpdBKBCIVZH8aRafJmNlsE6tbL-F7itFxiwEi9OQTKvm8UtSJ1DD_XoR09Sq__BQwgEbCnvmGkofrq0xbrpHiyBuaGCikrUeqvq_8baGxOCe9KEmeq4gQhC0REUo0xU2zf19jsGiBIe1etufVFcxJtw4GIFhl-XreKESIQ6F04bgeQ/cc_2024HYS070029_01_640_NT2.png
- show_name: false
- show_entity_picture: true
- show_state: false
- styles:
- card:
- - background-color: transparent
- border-radius: 0px
- padding: 0px
- margin: '-20px 0px -30px 0px'
- icon:
- - width: 88%
- fuel:
- card:
- type: custom:button-card
- entity: sensor.santa_fe_total_driving_range
- icon: mdi:gas-station
- name: |
- [[[
- const km = Math.round(states['sensor.distance_since_last_fill'].state);
- return `${km}km since filled`;
- ]]]
- label: Range
- show_label: true
- show_icon: false
- show_name: true
- show_state: true
- styles:
- grid:
- - grid-template-areas: '"gauge l" "gauge s" "gauge n"'
- - grid-template-columns: min-content 1fr
- - grid-template-rows: 1fr
- card:
- - background-color: transparent
- padding: 0px
- margin: 0px 0px 5px 10px
- border-radius: 0px
- width: auto
- height: 100px
- label:
- - font-size: 18px
- font-weight: 500
- color: rgba(255,255,255,0.5)
- justify-self: start
- align-self: center
- text-align: left
- padding: 5px 0px 0px 12px
- font-family: SF Pro Rounded
- state:
- - font-size: 30px
- font-weight: 600
- letter-spacing: 0.03em
- color: white
- justify-self: start
- align-self: center
- text-align: left
- padding: 0px 0px 5px 12px
- font-family: SF Pro Rounded
- name:
- - font-size: 16px
- font-weight: 500
- color: rgba(255,255,255,0.5)
- justify-self: start
- align-self: center
- text-align: left
- padding: 0px 0px 10px 12px
- font-family: SF Pro Rounded
- letter-spacing: 0.03em
- custom_fields:
- gauge:
- - height: auto
- width: 110px
- justify-self: start
- align-self: center
- text-align: left
- margin: 0px 0px 0px -7px
- custom_fields:
- gauge:
- card:
- type: custom:modern-circular-gauge
- entity: sensor.santa_fe_fuel_level
- secondary: {}
- max: 100
- gauge_width: 10
- show_header: false
- adaptive_icon_color: true
- icon: |
- [[[
- return (entity && parseFloat(entity.state) > 3)
- ? 'mdi:gas-station'
- : 'mdi:gas-station';
- ]]]
- show_icon: true
- segments:
- - from: 0
- to: 25
- color:
- - 255
- - 69
- - 58
- - from: 25
- to: 50
- color:
- - 255
- - 159
- - 10
- - from: 50
- to: 75
- color:
- - 49
- - 209
- - 88
- - from: 75
- to: 100
- color:
- - 11
- - 132
- - 255
- unit: '%'
- smooth_segments: true
- needle: false
- min: 0
- show_unit: true
- show_state: true
- card_mod:
- style: |
- ha-card {
- background-color: transparent;
- font-size: 25px !important;
- width: 100% !important;
- height: 100% !important;
- }
- text.value {
- font-size: 35px !important;
- font-weight: 600;
- }
- .arc.clear {
- stroke: rgba(0,0,0,0.3) !important;
- }
- .icon-container {
- margin-top: 0px;
- margin-bottom: -10px !important;
- margin-right: 5px;}
- ha-state-icon {
- --mdc-icon-size: 150% !important;}
- divider:
- card:
- type: entities
- entities:
- - type: divider
- style:
- height: 1px
- width: 100%
- margin-left: auto
- margin-right: auto
- background: rgba(255,255,255,0.1)
- card_mod:
- style: |
- ha-card {
- background: transparent;
- }
- #states.card-content {
- padding: 0px 10px 5px 0px;
- }
- status:
- card:
- type: custom:button-card
- styles:
- grid:
- - grid-template-areas: '"battery engine locked warning"'
- - grid-template-columns: auto auto auto auto
- - grid-template-rows: 1fr
- card:
- - background-color: transparent
- padding: 0px
- align-content: start
- justify-content: center
- border-radius: 0px
- height: 80px
- width: 280px
- margin: '-5px 0px 0px 0px'
- custom_fields:
- battery:
- card:
- type: custom:button-card
- entity: sensor.santa_fe_ev_battery_level
- name: |
- [[[
- let range = states['sensor.santa_fe_ev_battery_level'].state;
- return Math.floor(range) + "%";
- ]]]
- show_icon: false
- show_name: false
- show_state: false
- styles:
- grid:
- - grid-template-areas: '"gauge" "n"'
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr
- card:
- - background-color: transparent
- padding: 0px
- margin: '-10px -8px 0px 0px'
- border-radius: 0px
- width: 65px
- height: 150px
- name:
- - margin-top: '-45px'
- margin-bottom: 42px
- font-size: 14px
- font-weight: 550
- color: grey
- custom_fields:
- gauge:
- - height: auto
- width: 65px
- margin-top: '-40px'
- custom_fields:
- gauge:
- card:
- type: custom:modern-circular-gauge
- entity: sensor.santa_fe_ev_battery_level
- secondary: {}
- max: 100
- gauge_width: 10
- show_header: false
- adaptive_icon_color: true
- icon: mdi:battery-high
- show_icon: true
- segments:
- - from: 0
- to: 25
- color:
- - 255
- - 69
- - 58
- - from: 25
- to: 50
- color:
- - 255
- - 159
- - 10
- - from: 50
- to: 75
- color:
- - 49
- - 209
- - 88
- - from: 75
- to: 100
- color:
- - 49
- - 209
- - 88
- unit: '%'
- smooth_segments: false
- needle: false
- min: 0
- show_unit: true
- show_state: true
- card_mod:
- style: |
- ha-card {
- background-color: transparent;
- font-size: 25px !important;
- width: 100% !important;
- height: 100% !important;
- }
- text.value {
- font-size: 35px !important;
- font-weight: 600;
- }
- .arc.clear {
- stroke: rgba(0,0,0,0.3) !important;
- }
- .icon-container {
- margin-top: 10px;
- margin-right: 5px;}
- ha-state-icon {
- --mdc-icon-size: 150% !important;}
- engine:
- card:
- type: custom:button-card
- show_name: false
- entity: binary_sensor.santa_fe_engine
- name: |
- [[[
- return states['binary_sensor.santa_fe_engine'].state === "on" ? "Running" : "Off";
- ]]]
- icon: mdi:engine
- styles:
- grid:
- - grid-template-areas: '"i" "n"'
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr 1fr
- img_cell:
- - background: |
- [[[
- return states['binary_sensor.santa_fe_engine'].state === "off" ? "linear-gradient(45deg, rgba(255,255,255, 0.1) 20%, rgba(255,255,255, 0.2) 100%)" : "rgba(0,122,255,0.3)";
- ]]]
- - border-radius: 50px
- width: 45px
- height: 45px
- icon:
- - width: 30px
- color: |
- [[[
- return states['binary_sensor.santa_fe_engine'].state === "off" ? "rgba(255,255,255,0.7)" : "var(--label-badge-blue)";
- ]]]
- card:
- - background-color: transparent
- padding: 0px
- margin: '-10px 0px 0px 0px'
- width: 50px
- name:
- - font-size: 14px
- font-weight: 550
- color: grey
- locked:
- card:
- type: custom:button-card
- show_name: false
- entity: lock.santa_fe_door_lock
- name: |
- [[[
- return states['lock.santa_fe_door_lock'].state === "locked" ? "Locked" : "Unlocked";
- ]]]
- icon: mdi:lock
- styles:
- grid:
- - grid-template-areas: '"i" "n"'
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr 1fr
- img_cell:
- - background: |
- [[[
- return states['lock.santa_fe_door_lock'].state === "locked" ? "linear-gradient(45deg, rgba(255,255,255, 0.1) 20%, rgba(255,255,255, 0.2) 100%)" : "var(--label-badge-red)";
- ]]]
- - border-radius: 50px
- width: 45px
- height: 45px
- icon:
- - width: 25px
- color: |
- [[[
- return states['lock.santa_fe_door_lock'].state === "locked" ? "rgba(255,255,255,0.7)" : "white";
- ]]]
- card:
- - background-color: transparent
- padding: 0px
- margin: '-10px 0px 0px 0px'
- width: 50px
- name:
- - font-size: 14px
- font-weight: 550
- color: grey
- warning:
- card:
- type: custom:button-card
- show_name: false
- entity: binary_sensor.santa_fe_warning
- name: |
- [[[
- return states['binary_sensor.santa_fe_warning'].state === "off" ? "Ok" : "Warning";
- ]]]
- icon: mdi:alert
- styles:
- grid:
- - grid-template-areas: '"i" "n"'
- - grid-template-columns: 1fr
- - grid-template-rows: 1fr 1fr
- img_cell:
- - background: |
- [[[
- return states['binary_sensor.santa_fe_warning'].state === "off" ? "linear-gradient(45deg, rgba(255,255,255, 0.1) 20%, rgba(255,255,255, 0.2) 100%)" : "var(--label-badge-red)";
- ]]]
- - border-radius: 50px
- width: 45px
- height: 45px
- icon:
- - width: 25px
- color: |
- [[[
- return states['binary_sensor.santa_fe_warning'].state === "off" ? "rgba(255,255,255,0.7)" : "white";
- ]]]
- card:
- - background-color: transparent
- padding: 0px
- margin: '-10px 0px 0px 0px'
- width: 50px
- name:
- - font-size: 14px
- font-weight: 550
- color: grey
- card_mod:
- style: |
- :host {
- display: block;
- position: relative; margin: 0px 6px 0px 0px;
- }
- :host::before {
- content: "";
- position: absolute;
- inset: 0;
- border-radius: 30px;
- -webkit-backdrop-filter: blur(50px);
- z-index: -1;
- padding: .1rem;
- background: linear-gradient(60deg,
- rgba(255,255,255,0.0) 0%,
- rgba(255,255,255,0.2) 49%,
- rgba(255,255,255,0.2) 51%,
- rgba(255,255,255,0.0) 100%);
- -webkit-mask:
- linear-gradient(#fff 0 0) content-box,
- linear-gradient(#fff 0 0);
- -webkit-mask-composite: xor;
- mask-composite: exclude;
- z-index: 0; filter: saturate(140%);
- }
- :host::after {
- content: "";
- background: linear-gradient(180deg, rgba(255,255,255, 0.1) 20%, rgba(255,255,255, 0.0) 100%);
- position: absolute;
- inset: 0;
- border-radius: 30px;
- box-shadow: inset -8px 10px 15px rgba(0, 0, 0, 0.1);
- z-index: -1;
- -webkit-backdrop-filter:blur(30px) saturate(110%) brightness(90%);
- filter: drop-shadow(3px 3px 10px rgba(0, 0, 0, 0.2)); }
Advertisement
Add Comment
Please, Sign In to add comment