Hi,
Iām still ending come code cleaning (itās full of drafts etc) but i can share something
Clock Card (The input_boolean.menu_tablet is need to switch the 5 main icons on the Top), you can comment it:
- type: custom:button-card #Time
entity: sensor.time
layout: vertical
show_icon: false
show_name: false
show_state: true
show_label: true
label: "[[[ return states['sensor.pretty_date'].state; ]]]"
tap_action:
action: call-service
service: input_boolean.toggle
service_data:
entity_id: input_boolean.menu_tablet
styles:
card:
- background-color: transparent
- height: 100px
- box-shadow: none
state:
# - padding-top: 10%
- font-size: 290%
- font-weight: bold
- justify-self: center
label:
- justify-self: center
- font-size: 110%
this is the template code for the Label sensor:
- platform: template
sensors:
pretty_date:
friendly_name: Data di oggi
value_template: >-
{% set today = states("sensor.date") %}
{% set arr_week_days = ["Domenica", "LunedƬ", "MartedƬ", "MercoledƬ", "GiovedƬ", "VenerdƬ", "Sabato"] %}
{% set arr_months = ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"] %}
{% set week_day = as_timestamp(today) | timestamp_custom('%w') | int %}
{% set day = as_timestamp(today) | timestamp_custom('%d') %}
{% set month = as_timestamp(today) | timestamp_custom('%m') | int %}
{% set year = as_timestamp(today) | timestamp_custom('%Y') | int %}
{{ arr_week_days[week_day] }}, {{ day }} {{ arr_months[month-1] }} {{ year }}
This is the code for the FirstFloor room card:
type: 'custom:button-card'
view_layout:
grid-area: firstfloor
template:
- card_room
- blue_no_state
name: Primo Piano
entity: sensor.1p_temperature_round
icon: mdi:sofa
label: |
[[[
var temp = states['sensor.1p_temperature_round'].state;
var humi = states['sensor.1p_humidity'].state;
return 'š”ļø' + " " + temp + 'Ā°C' + " " + 'š§' + " " + humi + '%';
]]]
tap_action:
!include popup/first_popup.yaml
variables:
label_use_temperature: false
label_use_brightness: false
entity_1:
entity_id: light.luci_1p
templates:
- yellow_on
tap_action:
action: none
entity_2:
entity_id: sensor.aqara_tvoc_soggiorno_level
icon: mdi:air-filter
templates:
- green_no_state
tap_action:
action: more-info
entity_3:
entity_id: climate.1p
templates:
- red_on
tap_action:
action: more-info
entity_4:
entity_id: climate.1p_air_conditioner
templates:
- blue_on_cool
tap_action:
action: more-info
entity_4_icon: mdi:air-conditioner
Popup for first floor:
action: fire-dom-event
browser_mod:
command: popup
title: 1P Recap
style:
!include /config/dashboards/template/popup_layout_template.yaml
card:
type: custom:layout-card
layout_type: custom:grid-layout
layout:
!include /config/dashboards/template/popup_layout_setup.yaml
cards:
- !include /config/dashboards/1p/column1.yaml
- !include /config/dashboards/1p/column2.yaml
- !include /config/dashboards/1p/column3.yaml
Columns are just a vertical-stack with the entities you need. This is Colum2 for es
type: vertical-stack
view_layout:
grid-area: column2
cards:
- type: 'custom:button-card'
template: card_title
name: "Luci"
- type: horizontal-stack
cards:
- type: "custom:button-card"
template: card_light
entity: light.faretti_cucina
variables:
ulm_card_light_enable_slider: true
ulm_card_light_enable_collapse: true
ulm_card_light_enable_color: true
ulm_card_light_name: Faretti
hold_action:
action: more-info
entity: group.faretti_cucina
- type: "custom:button-card"
template: card_light
entity: light.shelly_cucina
variables:
ulm_card_light_enable_color: true
ulm_card_light_name: Cucina
- type: horizontal-stack
cards:
- type: "custom:button-card"
template: card_light
entity: light.ikea_fungo
variables:
ulm_card_light_enable_slider: true
ulm_card_light_enable_collapse: true
ulm_card_light_enable_color: true
ulm_card_light_name: Fungo
hold_action:
action: more-info
- type: "custom:button-card"
template: card_light
entity: light.shelly_soggiorno
variables:
ulm_card_light_enable_color: true
ulm_card_light_name: Divano
- type: horizontal-stack
cards:
- type: "custom:button-card"
template: card_light
entity: light.shelly_bagno_pt
variables:
ulm_card_light_enable_color: true
ulm_card_light_name: Bagno
- type: "custom:button-card"
template: card_light
entity: light.shelly_lavanderia
variables:
ulm_card_light_enable_color: true
ulm_card_light_name: Lavanderia
- type: horizontal-stack
cards:
- type: "custom:button-card"
template: card_light
entity: light.shelly_scala
variables:
ulm_card_light_enable_color: true
ulm_card_light_name: Scala
- type: "custom:button-card"
template: card_light
entity: light.shelly_antebagno
variables:
ulm_card_light_enable_color: true
ulm_card_light_name: Antebagno
- type: 'custom:button-card'
template: card_graph
variables:
ulm_card_graph_color: "var(--google-green)"
ulm_card_graph_name: Tvoc
ulm_card_graph_entity: sensor.aqara_tvoc_soggiorno_level
ulm_card_graph_type: fill
ulm_card_graph_hours: 48
BR
Nik