Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- button_card_templates:
- base_card:
- size: 100%
- styles:
- card:
- - justify-content: start
- - align-items: center
- - flex-direction: row
- - gap: 25px
- - margin: 0
- - scroll-snap-type: x mandatory
- - height: 150px
- - font-size: 22px
- - color: white
- - transition: all 0.5s ease-in
- - backdrop-filter: blur(10px)
- - box-shadow: 0 0 5px rgb(0,0,0)
- - background: rgba(170, 170, 170, 0.3)
- - border: none
- - border-radius: 0
- grid:
- - grid-template-areas: '"nothing nothing" "n i" "s i" "nothing1 nothing1"'
- - grid-template-columns: 1fr 30%
- - grid-template-rows: 1fr min-content min-content 2fr
- name:
- - color: var(--primary-background-color)
- - justify-self: start
- - padding: 10px
- - padding-left: 20px
- - text-wrap: wrap
- - text-align: left
- - font-size: 18px
- - width: 80%
- label:
- - color: var(--primary-background-color)
- - justify-self: start
- img_cell:
- - width: 50px
- - align-items: end
- - justify-items: end
- - margin-right: 0
- - margin: 0
- - padding: 0
- icon:
- - width: 100%
- - height: 100%
- state:
- - color: var(--primary-background-color)
- - justify-self: start
- - padding: 0px
- - padding-left: 20px
- - text-wrap: wrap
- - text-align: left
- - font-size: 14px
- - width: 80%
- state:
- - value: 'off'
- styles:
- icon:
- - color: rgba(255, 255, 255, 0.3)
- - value: 'on'
- styles:
- icon:
- - color: rgba(255, 255, 255, 0.7)
- light_card:
- template: base_card
- show_state: true
- state_display: |
- [[[
- var state = helpers.localize(entity);
- if (entity.state == 'on' && entity.attributes.brightness) {
- state = Math.round(entity.attributes.brightness * 100 / 255) + '%';
- }
- return state;
- ]]]
- hold_action:
- action: more-info
- size: 100%
- styles:
- card:
- - background: |
- [[[
- if (entity.state == 'on') {
- if (entity.attributes.rgb_color) {
- var rgb = entity.attributes.rgb_color;
- var color_start = 'rgba(' + rgb[0] + ', ' + rgb[1] + ', ' + rgb[2] + ', 0.1)';
- var color_end = 'rgba(' + rgb[0] + ', ' + rgb[1] + ', ' + rgb[2] + ', 0.4)';
- var color_bg_grey = 'rgba(255, 255, 255, 0.3)'
- return 'linear-gradient(180deg, ' + color_end + ' 0%, ' + color_bg_grey + ' 100%, ' + color_bg_grey + ' 100%)';
- }
- return 'rgba(255, 255, 255, 0.3)';
- } else {
- return 'rgba(170, 170, 170, 0.3)';
- }
- ]]]
- grid:
- - grid-template-areas: '"nothing nothing" "n i" "s i" "light-slider light-slider"'
- - grid-template-columns: 1fr 30%
- - grid-template-rows: 1fr min-content min-content 2fr
- custom_fields:
- light-slider:
- - position: absolute
- - bottom: 20px
- - height: 12px
- - right: 0
- - left: 0
- - padding: 0 30px
- - transition: transform 0.6s
- - transform: |
- [[[
- if (entity.state === 'off' || entity.state === 'unavailable' || !entity.attributes.brightness)
- return "translateY(40px)"
- else
- return "translateY(0)"
- ]]]
- custom_fields:
- light-slider:
- card:
- type: custom:my-slider-v2
- entity: |
- [[[
- return entity.entity_id;
- ]]]
- allowTapping: true
- allowSliding: true
- styles:
- card:
- - height: 100%
- - margin: 0
- - border-radius: 0px
- - border: none
- - background: transparent
- track:
- - background: hsl(0 0% 60%)
- - border-radius: 20px
- container:
- - border-radius: 0
- - overflow: visible
- progress:
- - background: hsl(0 0% 90%)
- - border-top-left-radius: 20px
- - border-bottom-left-radius: 20px
- thumb:
- - display: block
- - width: 20px
- - height: 20px
- - border-radius: 50%
- - background: white
- - transform: translateY(-4px)
- - box-shadow: 2px 0 8px 2px rgba(0, 0, 0, 0.15)
- entity_card:
- template: base_card
- show_state: true
- climate_card:
- template: base_card
- variables:
- temp_graph_entity: none
- show_state: true
- show_icon: false
- state_display: >
- [[[ return entity.attributes.temperature + '°C' + ' - ' +
- helpers.localize(entity); ]]]
- styles:
- card:
- - padding: 0
- grid:
- - grid-template-areas: >-
- "nothing buttons_left buttons_right" "n buttons_left buttons_right"
- "s buttons_left buttons_right" "nothing1 buttons_left buttons_right"
- - grid-template-columns: 1fr 50px 50px
- - grid-template-rows: 1fr min-content min-content 2fr
- - grid-gap: 0
- - height: 150px
- custom_fields:
- temp_chart:
- - position: absolute
- - bottom: 0
- - left: 0
- - z-index: 0
- - width: 100%
- - background: none
- - border: none
- - border-radius: none
- buttons_right:
- - height: 100%
- buttons_left:
- - height: 100%
- custom_fields:
- temp_chart:
- card:
- type: custom:mini-graph-card
- entities:
- - entity: |
- [[[
- return variables.temp_graph_entity;
- ]]]
- color: |
- [[[
- var curr_state = states[entity.entity_id].state;
- if (curr_state === 'cool') {
- return 'rgba(0, 0, 255, 1)';
- } else if (curr_state === 'heat') {
- return 'rgba(255, 0, 0, 1)';
- } else if (curr_state === 'dry') {
- return 'rgba(255, 127, 0, 1)';
- }
- return 'rgba(0, 0, 0, 1)';
- ]]]
- line_width: 0
- height: 60
- show:
- icon: false
- state: false
- name: false
- legend: false
- labels: false
- card_mod:
- style: |
- ha-card { border-style: none; background: none; border-radius: 0;}
- buttons_left:
- card:
- type: custom:paper-buttons-row
- styles:
- display: flex
- flex-direction: column
- flex-wrap: wrap
- height: 100%
- border: 1px solid rgba(0, 0, 0, 0.5)
- border-right: none
- buttons:
- - icon: mdi:snowflake
- styles:
- button:
- - height: 33.33333%
- - width: 100%
- - color: rgba(255, 255, 255, 1)
- - background: rgba(0, 0, 0, 0.2)
- - padding: 0
- - margin: 0
- - box-sizing: border-box
- - border-bottom: 1px solid rgba(0, 0, 0, 0.5)
- - border-right: none
- tap_action:
- action: call-service
- service: climate.set_hvac_mode
- service_data:
- entity_id: |
- [[[ return entity.entity_id ]]]
- hvac_mode: cool
- - icon: mdi:fire
- styles:
- button:
- - height: 33.33333%
- - width: 100%
- - color: rgba(255, 255, 255, 1)
- - background: rgba(0, 0, 0, 0.2)
- - padding: 0
- - margin: 0
- - box-sizing: border-box
- - border-right: none
- tap_action:
- action: call-service
- service: climate.set_hvac_mode
- service_data:
- entity_id: |
- [[[ return entity.entity_id ]]]
- hvac_mode: heat
- - icon: mdi:water-percent
- styles:
- button:
- - height: 33.33333%
- - width: 100%
- - color: rgba(255, 255, 255, 1)
- - background: rgba(0, 0, 0, 0.2)
- - padding: 0
- - margin: 0
- - box-sizing: border-box
- - border-top: 1px solid rgba(0, 0, 0, 0.5)
- - border-right: none
- tap_action:
- action: call-service
- service: climate.set_hvac_mode
- service_data:
- entity_id: |
- [[[ return entity.entity_id ]]]
- hvac_mode: dry
- buttons_right:
- card:
- type: custom:paper-buttons-row
- styles:
- display: flex
- flex-direction: column
- flex-wrap: wrap
- height: 100%
- border: 1px solid rgba(0, 0, 0, 0.5)
- buttons:
- - icon: mdi:arrow-up
- styles:
- button:
- - height: 33.33333%
- - width: 100%
- - color: rgba(255, 255, 255, 1)
- - background: rgba(0, 0, 0, 0.2)
- - padding: 0
- - margin: 0
- - box-sizing: border-box
- - border-bottom: 1px solid rgba(0, 0, 0, 0.5)
- tap_action:
- action: call-service
- service: script.hvac_increase_temperature_by_step
- service_data:
- hvac_entity: |
- [[[ return entity.entity_id ]]]
- step: 1
- - icon: mdi:power
- styles:
- button:
- - height: 33.33333%
- - width: 100%
- - color: rgba(255, 255, 255, 1)
- - background: rgba(0, 0, 0, 0.2)
- - padding: 0
- - margin: 0
- - box-sizing: border-box
- tap_action:
- action: call-service
- service: climate.set_hvac_mode
- service_data:
- entity_id: |
- [[[ return entity.entity_id ]]]
- hvac_mode: 'off'
- - icon: mdi:arrow-down
- styles:
- button:
- - height: 33.33333%
- - width: 100%
- - color: rgba(255, 255, 255, 1)
- - background: rgba(0, 0, 0, 0.2)
- - padding: 0
- - margin: 0
- - box-sizing: border-box
- - border-top: 1px solid rgba(0, 0, 0, 0.5)
- tap_action:
- action: call-service
- service: script.hvac_increase_temperature_by_step
- service_data:
- hvac_entity: |
- [[[ return entity.entity_id ]]]
- step: -1
- room_title_card:
- show_state: false
- show_icon: false
- variables:
- room_label: default_room
- sensor_temperature: unknown
- sensor_humidity: unknown
- styles:
- card:
- - width: 100%
- - justify-self: start
- - align-items: start
- - position: relative
- - top: 0
- - bottom: 0
- - margin: auto 0
- - border: none
- - background: transparent
- - color: rgba(255, 255, 255, 1)
- - font-family: Roboto
- grid:
- - grid-template-areas: '"indoor_temp" "title_big" "humidity"'
- - grid-template-rows: min-content 1fr min-content
- custom_fields:
- indoor_temp:
- - align-items: start
- - justify-self: start
- - text-transform: uppercase
- - font-family: Roboto
- - padding: 10px 0 0 0
- - text-align: left
- title_big:
- - font-size: 108px
- - font-weight: bold
- - align-items: start
- - justify-self: start
- - font-family: Roboto
- - text-align: left
- - text-wrap: wrap
- humidity:
- - align-items: start
- - justify-self: start
- - text-transform: uppercase
- - font-family: Roboto
- - padding: 10px 0 0 0
- custom_fields:
- indoor_temp: |
- [[[
- var text = ''
- var value = Math.round(states[variables.sensor_temperature].state)
- if (value > 25) {
- text = 'very hot'
- } else if (value > 22) {
- text = 'hot'
- } else if (value > 20) {
- text = 'comfortable'
- } else if (value > 18) {
- text = 'cool'
- } else {
- text = 'cold'
- }
- return '<span style="font-weight: bolder;">' + value + '°</span> - ' + text
- ]]]
- title_big: |
- [[[ return variables.room_label; ]]]
- humidity: |
- [[[
- var text = ''
- var value = Math.round(states[variables.sensor_humidity].state)
- if (value > 60) {
- text = 'high'
- } else if (value < 30) {
- text = 'low'
- } else {
- text = 'good'
- }
- return 'Humidity is ' + text + ' at <span style="font-weight: bolder;">'
- + value + '%</span>'
- ]]]
- card_mod:
- style: |
- @media (max-width: 600px) {
- ha-card #title_big {
- font-size: 72px !important;
- }
- }
- @media (max-width: 500px) {
- ha-card #title_big {
- font-size: 48px !important;
- }
- }
- menu_entry_card:
- show_state: false
- show_icon: false
- show_title: false
- variables:
- path: /none
- tap_action:
- action: navigate
- navigation_path: '[[[ return variables.path ]]]'
- styles:
- card:
- - height: 50px
- - max-width: 150px
- - text-transform: uppercase
- - border: none
- - border-radius: 0
- - background: transparent
- - color: rgba(255, 255, 255, 1)
- - border-bottom: |
- [[[
- if (window.location.pathname.includes(variables.path)) {
- return '2px solid rgba(255, 255, 255, 1)';
- } else {
- return 'none';
- }
- ]]]
- label:
- - font-weight: bold
- name:
- - font-weight: bold
- views:
- - title: Living room
- type: custom:grid-layout
- layout:
- grid-template-rows: min-content 1fr min-content
- grid-column-gap: 0px
- margin: 0 30px
- padding: 0
- height: 100%
- position: relative
- place-items: center normal
- card_margin: 0
- mediaquery:
- '(max-width: 600px)':
- margin: 0 10px
- cards:
- - type: custom:layout-card
- layout_type: custom:grid-layout
- layout:
- grid-template-columns: repeat(auto-fill, min(160px))
- cards:
- - type: custom:button-card
- template: menu_entry_card
- name: living room
- variables:
- path: /dashboard-fullscreenhome/room_livingroom
- - type: custom:button-card
- template: menu_entry_card
- name: bedroom
- variables:
- path: /dashboard-fullscreenhome/room_bedroom
- - type: custom:button-card
- template: menu_entry_card
- name: office
- variables:
- path: /dashboard-fullscreenhome/room_office
- - type: custom:button-card
- template: menu_entry_card
- name: bathroom
- variables:
- path: /dashboard-fullscreenhome/room_bathroom
- - type: custom:button-card
- template: room_title_card
- variables:
- room_label: Living room
- sensor_temperature: sensor.living_room_average_temperature
- sensor_humidity: sensor.living_room_average_humidity
- - type: custom:layout-card
- layout_type: custom:grid-layout
- layout:
- grid-template-columns: repeat(auto-fill, min(260px))
- mediaquery:
- '(max-width: 600px)':
- grid-template-columns: 1fr
- cards:
- - type: custom:button-card
- entity: light.living_room_ceiling
- template: light_card
- name: Ceiling
- # Add other cards here...
- #- type: custom:button-card
- # entity: light.living_room_ceiling
- # template: light_card
- # name: Ceiling
- # Add other cards here...
- - type: custom:button-card
- entity: climate.ac_1
- template: climate_card
- name: AC
- variables:
- temp_graph_entity: sensor.living_room_average_temperature
- - type: custom:button-card
- template: entity_card
- entity: binary_sensor.living_room_doors_or_windows_open
- name: Doors or windows
- icon: mdi:door
- sections: []
- subview: false
- background:
- opacity: 100
- alignment: center
- size: cover
- repeat: repeat
- attachment: fixed
- image: /api/image/serve/0f4538e0fe0f7c5ba96f07b8c02835e6/original
- path: room_livingroom
- - title: Office
- type: custom:grid-layout
- layout:
- grid-template-rows: min-content 1fr max-content
- grid-column-gap: 10px
- margin: 0 0 0 30px
- padding: 0
- height: 100%
- position: relative
- place-items: center normal
- backdrop-filter: blur(10px)
- cards:
- - type: custom:layout-card
- layout_type: custom:grid-layout
- layout:
- grid-template-columns: repeat(auto-fill, min(160px))
- cards:
- - type: custom:button-card
- template: menu_entry_card
- name: living room
- variables:
- path: /dashboard-fullscreenhome/room_livingroom
- - type: custom:button-card
- template: menu_entry_card
- name: bedroom
- variables:
- path: /dashboard-fullscreenhome/room_bedroom
- - type: custom:button-card
- template: menu_entry_card
- name: office
- variables:
- path: /dashboard-fullscreenhome/room_office
- - type: custom:button-card
- template: menu_entry_card
- name: bathroom
- variables:
- path: /dashboard-fullscreenhome/room_bathroom
- - type: custom:button-card
- template: room_title_card
- variables:
- room_label: Office
- sensor_temperature: sensor.office_average_temperature
- sensor_humidity: sensor.office_average_humidity
- - type: custom:layout-card
- layout_type: custom:grid-layout
- layout:
- grid-template-columns: repeat(auto-fill, min(260px))
- cards:
- - type: custom:button-card
- template: light_card
- entity: light.office_ceiling
- name: Ceiling
- - type: custom:button-card
- template: climate_card
- entity: climate.ac_2
- name: AC
- variables:
- temp_graph_entity: sensor.office_average_temperature
- - type: custom:button-card
- template: entity_card
- entity: binary_sensor.office_door_contact
- name: Doors
- icon: mdi:door
- sections: []
- subview: false
- background:
- opacity: 100
- alignment: center
- size: cover
- repeat: repeat
- attachment: fixed
- image: /api/image/serve/3fa9c38652cd3e35d0e5860508359744/original
- path: room_office
Advertisement
Add Comment
Please, Sign In to add comment