Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type: custom:layout-card
- layout_type: custom:grid-layout
- layout:
- grid-template-columns: 33% 33% 33%
- grid-template-rows: 70px
- grid-template-areas: |
- "data ora meteo"
- cards:
- - type: custom:button-card
- name: |
- [[[
- return states['sensor.giorno'].state + ", "
- ]]]
- label: |
- [[[
- return states['sensor.mese'].state
- ]]]
- show_label: true
- styles:
- card:
- - height: 60px
- - background: none
- - border: none
- - overflow: visible
- - padding-left: 8px
- name:
- - justify-self: start
- - font-size: 20px
- - font-weight: 300
- label:
- - justify-self: start
- - font-size: 18px
- - font-weight: 500
- view_layout:
- grid-area: data
- - type: custom:button-card
- name: |
- [[[
- return states['sensor.time'].state
- ]]]
- tap_action:
- action: perform-action
- perform_action: |
- [[[
- this.dispatchEvent(new Event('hass-toggle-menu', { bubbles: true, composed: true}));
- return none;
- ]]]
- styles:
- card:
- - height: 60px
- - background: none
- - border: none
- - overflow: visible
- name:
- - justify-self: center
- - font-size: 30px
- - font-weight: 500
- view_layout:
- grid-area: ora
- - square: false
- type: grid
- columns: 1
- cards:
- - type: custom:button-card
- name: >
- [[[ return Math.round(states['sensor.temperatura_media'].state*10)/10
- + '<span style="font-size:0.7em"> °C</span>']]]
- label: >
- [[[ return states['sensor.meteo_orario'].attributes.temperature +
- '<span style="font-size:0.6em"> °C</span>']]]
- show_label: true
- custom_fields:
- icon: |
- [[[
- var weather = states['sensor.meteo_orario'].state;
- return '<img src="/local/ic/weather_icons/animated/' + weather + '.svg" width="50" height="50">'
- ]]]
- styles:
- grid:
- - grid-template-areas: "\"icon n\" \"icon l\""
- card:
- - height: 60px
- - overflow: visible
- - background: none
- - border: none
- - padding-right: 8px
- - margin-top: "-8px"
- name:
- - justify-self: end
- - font-size: 14px
- label:
- - justfy-self: end
- - font-size: 26px
- - font-weight: 500
- custom_fields:
- icon:
- - justify-self: end
- - align-self: end
- - paddig-right: 10px
- - margin-bottom: "-10px"
- tap_action:
- action: navigate
- navigation_path: "#previsioni"
- view_layout:
- grid-area: meteo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement