Alors voici le code de cette view:
cards:
- cards:
- template: return_button
type: custom:button-card
- template: pilule_temperature
type: custom:button-card
- template: pilule_consommation_prix
type: custom:button-card
type: horizontal-stack
- type: custom:button-card
name: Températures
template: titre
- cards:
- type: weather-forecast
style: |
ha-card {
box-shadow: var(--box-shadow);
border-radius: 20px;
padding: 12px !important;
}
.icon-image{
min-width: 42px !important;
margin-right: 12px !important;
}
.icon-image > *{
height: 42px !important;
width: 42px;
flex: 0 0 42px !important;
}
.state {
font-size: 14px !important;
font-weight: bold;
}
.name{
font-weight: bolder;
font-size: 12px !important;
filter: opacity(40%);
color: #333333 !important;
}
.temp{
font-size: 14px !important;
font-weight: bold;
margin-right: 14px !important;
}
.attribute{
font-size: 12px !important;
font-weight: bolder;
filter: opacity(40%);
color: #333333 !important;
}
span{
font-size: 14px !important;
font-weight: bold;
}
entity: weather.nersac
show_forecast: false
name: Nersac
type: horizontal-stack
- type: custom:button-card
label: Intérieur
template: titre
- type: grid
columns: 2
square: false
cards:
- type: custom:button-card
template: graph_with_card
variables:
entity_carte_gauche: sensor.netatmo_galahome_galastation_temperature
entity_carte_droite: sensor.netatmo_galahome_galastation_humidity
entity_graph: sensor.netatmo_galahome_galastation_temperature
name_carte_gauche: Température
name_carte_droite: Humidité
color: var(--google-blue-500)
show_icon_carte_droite: false
show_icon_carte_gauche: false
show_name_carte_droite: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
icon_carte_droite: 💧
show_label_up: true
label: Salon
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 24
hour24: true
show:
extrema: true
- type: custom:button-card
template: graph_with_card
variables:
entity_carte_gauche: sensor.sensor_suitep_temperature
entity_carte_droite: sensor.sensor_suitep_humidity
entity_graph: sensor.sensor_suitep_temperature
name_carte_gauche: Température
name_carte_droite: Humidité
color: var(--google-blue-500)
show_icon_carte_droite: false
show_icon_carte_gauche: false
show_name_carte_droite: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
icon_carte_droite: 💧
show_label_up: true
label: Suite Parentale
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 24
hour24: true
show:
extrema: true
- type: custom:button-card
template: graph_with_card
variables:
entity_carte_gauche: sensor.sensor_chbjardin_temperature
entity_carte_droite: sensor.sensor_chbjardin_humidity
entity_graph: sensor.sensor_chbjardin_temperature
name_carte_gauche: Température
name_carte_droite: Humidité
color: var(--google-blue-500)
show_icon_carte_droite: false
show_icon_carte_gauche: false
show_name_carte_droite: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
icon_carte_droite: 💧
show_label_up: true
label: Chambre Jardin
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 24
hour24: true
show:
extrema: true
- type: custom:button-card
template: graph_with_card
variables:
entity_carte_gauche: sensor.sensor_chbterrasse_temperature
entity_carte_droite: sensor.sensor_chbterrasse_humidity
entity_graph: sensor.sensor_chbterrasse_temperature
name_carte_gauche: Température
name_carte_droite: Humidité
color: var(--google-blue-500)
show_icon_carte_droite: false
show_icon_carte_gauche: false
show_name_carte_droite: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
icon_carte_droite: 💧
show_label_up: true
label: Chambre Terrasse
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 24
hour24: true
show:
extrema: true
- type: custom:button-card
template: graph_with_card
variables:
entity_carte_gauche: sensor.sensor_cellier_temperature
entity_carte_droite: sensor.sensor_cellier_humidity
entity_graph: sensor.sensor_cellier_temperature
name_carte_gauche: Température
name_carte_droite: Humidité
color: var(--google-blue-500)
show_icon_carte_droite: false
show_icon_carte_gauche: false
show_name_carte_droite: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
icon_carte_droite: 💧
show_label_up: true
label: Cellier
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 24
hour24: true
show:
extrema: true
- type: custom:button-card
template: graph_with_card
variables:
entity_carte_gauche: sensor.sensor_garage_temperature
entity_carte_droite: sensor.sensor_garage_humidity
entity_graph: sensor.sensor_garage_temperature
name_carte_gauche: Température
name_carte_droite: Humidité
color: var(--google-blue-500)
show_icon_carte_droite: false
show_icon_carte_gauche: false
show_name_carte_droite: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
icon_carte_droite: 💧
show_label_up: true
label: Garage
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 24
hour24: true
show:
extrema: true
- type: custom:button-card
label: Extérieur
template: titre
- type: grid
columns: 2
square: false
cards:
- type: custom:button-card
template: graph_with_card
variables:
entity_carte_gauche: sensor.netatmo_galahome_galastation_galamodule_temperature
entity_carte_droite: sensor.netatmo_galahome_galastation_galamodule_humidity
entity_graph: sensor.netatmo_galahome_galastation_galamodule_temperature
name_carte_gauche: Température
name_carte_droite: Humidité
color: var(--google-green-500)
show_icon_carte_droite: false
show_icon_carte_gauche: false
show_name_carte_droite: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
icon_carte_droite: 💧
show_label_up: true
label: Jardin
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 48
hour24: true
show:
extrema: true
- type: custom:button-card
template: graph_with_card_one_item
variables:
entity_carte_gauche: sensor.sonde_piscine
entity_graph: sensor.sonde_piscine
name_carte_gauche: Température
color: var(--google-green-500)
show_icon_carte_gauche: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
show_label_up: true
label: Piscine
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 48
hour24: true
show:
extrema: true
type: vertical-stack
Pour comparer voici une autre vue:
et son code:
cards:
- cards:
- template: bordures
type: custom:button-card
- template: return_button
type: custom:button-card
- template: pilule_temperature
type: custom:button-card
- template: pilule_consommation_prix
type: custom:button-card
- card:
entity: input_boolean.mode_vacances
template: pilule
tap_action:
action: navigate
navigation_path: /lovelace/localisation
label: ⛱️
type: custom:button-card
conditions:
- entity: input_boolean.mode_vacances
state_not: 'off'
type: conditional
- card:
entity: input_boolean.invite_present
template: pilule
tap_action:
action: navigate
navigation_path: /lovelace/localisation
label: 😃
type: custom:button-card
conditions:
- entity: input_boolean.invite_present
state_not: 'off'
type: conditional
- template: bordures
type: custom:button-card
type: horizontal-stack
- type: grid
cards:
- type: custom:button-card
name: Piscine
template: titre
- type: grid
cards:
- type: custom:button-card
template: graph_with_card_one_item
variables:
entity_carte_gauche: sensor.sonde_piscine
entity_graph: sensor.sonde_piscine
name_carte_gauche: Température
color: var(--google-green-500)
show_icon_carte_gauche: false
show_name_carte_gauche: false
icon_carte_gauche: 🌡️
show_label_up: true
label: Piscine
show_label_down: false
custom_fields:
item2:
card:
hours_to_show: 48
hour24: true
show:
extrema: true
columns: 1
square: false
- type: grid
cards: []
columns: 2
square: false
- type: grid
cards:
- entity: input_boolean.light_pool
name: Lumière
template:
- icon_info_bg
- light
type: custom:button-card
variables:
image: /local/images/backgrounds/lamp_v2.jpg
styles:
card:
- padding-top: 10px
- padding-bottom: 10px
- background-blend-mode: multiply
- background: |
[[[
if (variables.image != null) {
return 'center / cover url(' + variables.image + ') rgba(0, 0, 0, 0.3)';
}
return '';
]]]
- entity: input_boolean.winter_pool
name: Hivernage
template:
- icon_info_bg
- bleu
type: custom:button-card
label: |-
[[[
var etat = '';
if (entity.state == 'on')
etat = "On ";
else
etat = "Off";
return etat;
]]]
variables:
image: /local/images/backgrounds/snow.jpg
styles:
card:
- background-blend-mode: multiply
- background: |
[[[
if (variables.image != null) {
return 'center / cover url(' + variables.image + ') rgba(0, 0, 0, 0.3)';
}
return '';
]]]
- entity: input_select.pool_pump
name: Mode filtration
variables:
cycle: sensor.cycle_filtration
image: /local/images/backgrounds/clean.jpg
template:
- icon_info_bg
- sensor_piscine
type: custom:button-card
styles:
card:
- padding-top: 10px
- padding-bottom: 10px
- background-blend-mode: multiply
- background: |
[[[
if (variables.image != null) {
return 'center / cover url(' + variables.image + ') rgba(0, 0, 0, 0.3)';
}
return '';
]]]
- entity: input_datetime.pool_filter_date
name: Clean filtration dans
template:
- icon_info_bg
- sensor_date
variables:
nbJours: 15
image: /local/images/backgrounds/calendar.jpg
type: custom:button-card
styles:
card:
- padding-top: 10px
- padding-bottom: 10px
- background-blend-mode: multiply
- background: |
[[[
if (variables.image != null) {
return 'center / cover url(' + variables.image + ') rgba(0, 0, 0, 0.7)';
}
return '';
]]]
columns: 2
square: false
columns: 1
square: false
type: vertical-stack