Bonjour à tous.
J’ai suivi ce sujet pour refaire mes cartes de suivi des températures et humidité. Quel type de carte pour capteur température + humidité?
Je suis arrivé à ce résultat qui est très bien. Hors mis un affichage de la dernière mise à jour qui ne fonctionne pas mais ce n’est pas le sujet.
Je souhaiterai ajouter l’ouverture de la gestion de ma tête thermostatique en cliquant sur la pièce correspondante. J’ai essayé plusieurs pistes, notamment avec chatGPT mais rien ne fonctionne. Je sais qu’avec HA tout est possible, quelqu’un a t’il une idée? La carte étant uniquement en YAML, je n’ai pas accès à l’interphase visuel de HA.
Voici le code de la carte:type:
* type: custom:button-card
entity: sensor.thermometre_chambre_parentale_temperature
size: 10%
icon: mdi:bed-double
show_state: false
show_name: false
label: Parents
show_label: true
styles:
card:
- position: relative
grid:
- grid-template-areas: >-
« battery . » « i i » « l l » « temp temp » « hum hum » « update heure » « apex
apex » « graph graph »
- grid-template-columns: 50% 50%
- margin-top: 3%
- padding-bottom: 0%
label:
- font-size: 11px
- font-style: italic
- opacity: 75%
icon:
- opacity: 75%
custom_fields:
temp:
- font-size: 20px
hum:
- font-size: 13px
- font-style: italic
battery:
- position: absolute
- left: 80%
- top: 5%
update:
- justify-self: middle
- align-self: middle
- font-style: italic
- font-size: 12px
- opacity: 60%
- margin-top: 30%
heure:
- justify-self: middle
- align-self: middle
- font-style: italic
- font-size: 12px
- opacity: 60%
- margin-top: 30%
apex:
- position: absolute
- top: « -5% »
- left: « -16% »
- width: 100%
- height: 100%
graph:
- margin-top: 0%
custom_fields:
temp: >
\[\[\[ var temp =
states\[‹ sensor.thermometre_chambre_parentale_temperature ›\].state; return
`<ha-icon icon="mdi:thermometer" style="width: 18px; height: 18px; color: #7dc8ff "></ha-icon>` + temp + ‹ ° ›; \]\]\]
hum: >
\[\[\[ var hum =
states\[‹ sensor.thermometre_chambre_parentale_humidity ›\].state; return
`<ha-icon icon="mdi:water" style="width: 15px; height: 15px; color: #7dc8ff "></ha-icon>` + hum + ‹ % ›; \]\]\]
battery: |
\[\[\[
var entity = states\[‹ sensor.thermometre_chambre_parentale_battery ›\];
if (!entity) return ‹ N/A ›;
var battery = parseInt(entity.state);
if (battery >= 70)
return `<ha-icon icon="mdi:battery" style="width: 20px; height: 20px; color: green"></ha-icon>`;
else if (battery >= 20)
return `<ha-icon icon="mdi:battery-50" style="width: 20px; height: 20px; color: orange"></ha-icon>`;
else if (battery >= 1)
return `<ha-icon icon="mdi:battery-10" style="width: 20px; height: 20px; color: red"></ha-icon>`;
else
return `<ha-icon icon="mdi:battery-alert-variant-outline" style="width: 20px; height: 20px; color: darkred"></ha-icon>`;
\]\]\]
update: |
\[\[\[
return `<ha-icon icon="mdi:progress-clock" style="width: 20px; height: 20px;"></ha-icon>` + ’ Dernière M.A.J.';
\]\]\]
heure: |
\[\[\[
var entity = states\[‹ sensor.thermometre_chambre_parentale_last_seen ›\];
if (!entity) return ‹ N/A ›;
var lastSeen = entity.state;
if (lastSeen === ‹ unknown › || lastSeen === ‹ unavailable ›) return ‹ N/A ›;
return helpers.relativeTime(lastSeen);
\]\]\]
apex:
card:
type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.thermometre_chambre_parentale_temperature
max: 40
color: « #00FF00 »
show:
legend_value: false
- entity: sensor.thermometre_chambre_parentale_humidity
max: 100
color: « #FEFEFE »
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
dropShadow:
enabled: true
top: 3
left: 0
blur: 4
opacity: 0.25
strokeWidth: 75%
margin: 3
fill:
type: gradient
gradient:
type: vertical
gradientToColors:
- « #E73E01 »
- « #0F9DE8 »
stops:
- 0
- 100
legend:
show: false
chart:
height: 100%
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
border: none;
}
graph:
card:
type: custom:mini-graph-card
name: Parents
hours_to_show: 24
points_per_hour: 1
hour24: true
line_width: 2
decimals: 1
entities:
- entity: sensor.thermometre_chambre_parentale_temperature
name: Temp.
color: « #2a75cf »
- entity: sensor.thermometre_chambre_parentale_humidity
color: « #ffc04c »
name: Humidité
show_line: true
show_points: true
show_legend: true
y_axis: secondary
show:
fill: true
graph: line
icon: false
name: false
state: false
labels: false
extrema: true
average: true
icon_adaptive_color: false
labels_secondary: false
align_icon: right
align_state: left
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
border: none;
}
* type: custom:button-card
entity: sensor.thermometre_salle_de_douche_temperature
size: 10%
icon: mdi:shower-head
show_state: false
show_name: false
label: Douche
show_label: true
styles:
card:
- position: relative
grid:
- grid-template-areas: >-
« battery . » « i i » « l l » « temp temp » « hum hum » « update heure » « apex
apex » « graph graph »
- grid-template-columns: 50% 50%
- margin-top: 3%
- padding-bottom: 0%
label:
- font-size: 11px
- font-style: italic
- opacity: 75%
icon:
- opacity: 75%
custom_fields:
temp:
- font-size: 20px
hum:
- font-size: 13px
- font-style: italic
battery:
- position: absolute
- left: 80%
- top: 5%
update:
- justify-self: middle
- align-self: middle
- font-style: italic
- font-size: 12px
- opacity: 60%
- margin-top: 30%
heure:
- justify-self: middle
- align-self: middle
- font-style: italic
- font-size: 12px
- opacity: 60%
- margin-top: 30%
apex:
- position: absolute
- top: « -5% »
- left: « -20% »
- width: 100%
- height: 100%
graph:
- margin-top: 0%
custom_fields:
temp: >
\[\[\[ var temp =
states\[‹ sensor.thermometre_salle_de_douche_temperature ›\].state; return
`<ha-icon icon="mdi:thermometer" style="width: 18px; height: 18px; color: #7dc8ff "></ha-icon>` + temp + ‹ ° ›; \]\]\]
hum: >
\[\[\[ var hum =
states\[‹ sensor.thermometre_salle_de_douche_humidity ›\].state; return
`<ha-icon icon="mdi:water" style="width: 15px; height: 15px; color: #7dc8ff "></ha-icon>` + hum + ‹ % ›; \]\]\]
battery: |
\[\[\[
var entity = states\[‹ sensor.thermometre_salle_de_douche_battery ›\];
if (!entity) return ‹ N/A ›;
var battery = parseInt(entity.state);
if (battery >= 70)
return `<ha-icon icon="mdi:battery" style="width: 20px; height: 20px; color: green"></ha-icon>`;
else if (battery >= 20)
return `<ha-icon icon="mdi:battery-50" style="width: 20px; height: 20px; color: orange"></ha-icon>`;
else if (battery >= 1)
return `<ha-icon icon="mdi:battery-10" style="width: 20px; height: 20px; color: red"></ha-icon>`;
else
return `<ha-icon icon="mdi:battery-alert-variant-outline" style="width: 20px; height: 20px; color: darkred"></ha-icon>`;
\]\]\]
update: |
\[\[\[
return `<ha-icon icon="mdi:progress-clock" style="width: 20px; height: 20px;"></ha-icon>` + ’ Dernière M.A.J.';
\]\]\]
heure: |
\[\[\[
var entity = states\[‹ sensor.thermometre_salle_de_douche_last_seen ›\];
if (!entity) return ‹ N/A ›;
var lastSeen = entity.state;
if (lastSeen === ‹ unknown › || lastSeen === ‹ unavailable ›) return ‹ N/A ›;
return helpers.relativeTime(lastSeen);
\]\]\]
apex:
card:
type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.thermometre_salle_de_douche_temperature
max: 40
color: « #00FF00 »
show:
legend_value: false
- entity: sensor.thermometre_salle_de_douche_humidity
max: 100
color: « #FEFEFE »
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
dropShadow:
enabled: true
top: 3
left: 0
blur: 4
opacity: 0.25
strokeWidth: 75%
margin: 3
fill:
type: gradient
gradient:
type: vertical
gradientToColors:
- « #E73E01 »
- « #0F9DE8 »
stops:
- 0
- 100
legend:
show: false
chart:
height: 100%
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
border: none;
}
graph:
card:
type: custom:mini-graph-card
name: Douche
hours_to_show: 24
points_per_hour: 1
hour24: true
line_width: 2
decimals: 1
entities:
- entity: sensor.thermometre_salle_de_douche_temperature
name: Temp.
color: « #2a75cf »
- entity: sensor.thermometre_salle_de_douche_humidity
color: « #ffc04c »
name: Humidité
show_line: true
show_points: true
show_legend: true
y_axis: secondary
show:
fill: true
graph: line
icon: false
name: false
state: false
labels: false
extrema: true
average: true
icon_adaptive_color: false
labels_secondary: false
align_icon: right
align_state: left
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
border: none;
}
* type: custom:button-card
entity: sensor.thermometre_chambre_lonny_temperature
size: 10%
icon: mdi:human-baby-changing-table
show_state: false
show_name: false
label: Lonny
show_label: true
styles:
card:
- position: relative
grid:
- grid-template-areas: >-
« battery . » « i i » « l l » « temp temp » « hum hum » « update heure » « apex
apex » « graph graph »
- grid-template-columns: 50% 50%
- margin-top: 3%
- padding-bottom: 0%
label:
- font-size: 11px
- font-style: italic
- opacity: 75%
icon:
- opacity: 75%
custom_fields:
temp:
- font-size: 20px
hum:
- font-size: 13px
- font-style: italic
battery:
- position: absolute
- left: 80%
- top: 5%
update:
- justify-self: middle
- align-self: middle
- font-style: italic
- font-size: 12px
- opacity: 60%
- margin-top: 30%
heure:
- justify-self: middle
- align-self: middle
- font-style: italic
- font-size: 12px
- opacity: 60%
- margin-top: 30%
apex:
- position: absolute
- top: « -5% »
- left: « -20% »
- width: 100%
- height: 100%
graph:
- margin-top: 0%
custom_fields:
temp: >
\[\[\[ var temp =
states\[‹ sensor.thermometre_chambre_lonny_temperature ›\].state; return
`<ha-icon icon="mdi:thermometer" style="width: 18px; height: 18px; color: #7dc8ff;"></ha-icon>` + temp + ‹ ° ›; \]\]\]
hum: >
\[\[\[ var hum = states\[‹ sensor.thermometre_chambre_lonny_humidity ›\].state;
return `<ha-icon icon="mdi:water" style="width: 15px; height: 15px; color: #7dc8ff;"></ha-icon>` + hum + ‹ % ›; \]\]\]
battery: |
\[\[\[
var entity = states\[‹ sensor.thermometre_chambre_lonny_battery ›\];
if (!entity) return ‹ N/A ›;
var battery = parseInt(entity.state);
if (battery >= 70)
return `<ha-icon icon="mdi:battery" style="width: 20px; height: 20px; color: green"></ha-icon>`;
else if (battery >= 20)
return `<ha-icon icon="mdi:battery-50" style="width: 20px; height: 20px; color: orange"></ha-icon>`;
else if (battery >= 1)
return `<ha-icon icon="mdi:battery-10" style="width: 20px; height: 20px; color: red"></ha-icon>`;
else
return `<ha-icon icon="mdi:battery-alert-variant-outline" style="width: 20px; height: 20px; color: darkred"></ha-icon>`;
\]\]\]
update: |
\[\[\[
return `<ha-icon icon="mdi:progress-clock" style="width: 20px; height: 20px;"></ha-icon>` + ’ Dernière M.A.J.';
\]\]\]
heure: |
\[\[\[
var entity = states\[‹ sensor.thermometre_chambre_lonny_last_seen ›\];
if (!entity) return ‹ N/A ›;
var lastSeen = entity.state;
if (lastSeen === ‹ unknown › || lastSeen === ‹ unavailable ›) return ‹ N/A ›;
return helpers.relativeTime(lastSeen);
\]\]\]
apex:
card:
type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.thermometre_chambre_lonny_temperature
max: 40
color: « #00FF00 »
show:
legend_value: false
- entity: sensor.thermometre_chambre_lonny_humidity
max: 100
color: « #FEFEFE »
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
dropShadow:
enabled: true
top: 3
left: 0
blur: 4
opacity: 0.25
strokeWidth: 75%
margin: 3
fill:
type: gradient
gradient:
type: vertical
gradientToColors:
- « #E73E01 »
- « #0F9DE8 »
stops:
- 0
- 100
legend:
show: false
chart:
height: 100%
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
border: none;
}
graph:
card:
type: custom:mini-graph-card
name: Lonny
hours_to_show: 24
points_per_hour: 1
hour24: true
line_width: 2
decimals: 1
entities:
- entity: sensor.thermometre_chambre_lonny_temperature
name: Temp.
color: « #2a75cf »
- entity: sensor.thermometre_chambre_lonny_humidity
color: « #ffc04c »
name: Humidité
show_line: true
show_points: true
show_legend: true
y_axis: secondary
show:
fill: true
graph: line
icon: false
name: false
state: false
labels: false
extrema: true
average: true
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
border: none;
}
* type: custom:button-card
entity: sensor.thermometre_bureau_temperature
size: 10%
icon: mdi:printer
show_state: false
show_name: false
label: Bureau
show_label: true
styles:
card:
- position: relative
grid:
- grid-template-areas: >-
« battery . » « i i » « l l » « temp temp » « hum hum » « update heure » « apex
apex » « graph graph »
- grid-template-columns: 50% 50%
- margin-top: 3%
- padding-bottom: 0%
label:
- font-size: 11px
- font-style: italic
- opacity: 75%
icon:
- opacity: 75%
custom_fields:
temp:
- font-size: 20px
hum:
- font-size: 13px
- font-style: italic
battery:
- position: absolute
- left: 80%
- top: 5%
update:
- justify-self: middle
- align-self: middle
- font-style: italic
- font-size: 12px
- opacity: 60%
- margin-top: 30%
heure:
- justify-self: middle
- align-self: middle
- font-style: italic
- font-size: 12px
- opacity: 60%
- margin-top: 30%
apex:
- position: absolute
- top: « -5% »
- left: « -20% »
- width: 100%
- height: 100%
graph:
- margin-top: 0%
custom_fields:
temp: >
\[\[\[ var temp = states\[‹ sensor.thermometre_bureau_temperature ›\].state;
return `<ha-icon icon="mdi:thermometer" style="width: 18px; height: 18px; color: #7dc8ff;"></ha-icon>` + temp + ‹ ° ›; \]\]\]
hum: >
\[\[\[ var hum = states\[‹ sensor.thermometre_bureau_humidity ›\].state; return
`<ha-icon icon="mdi:water" style="width: 15px; height: 15px; color: #7dc8ff;"></ha-icon>` + hum + ‹ % ›; \]\]\]
battery: |
\[\[\[
var entity = states\[‹ sensor.thermometre_bureau_battery ›\];
if (!entity) return ‹ N/A ›;
var battery = parseInt(entity.state);
if (battery >= 70)
return `<ha-icon icon="mdi:battery" style="width: 20px; height: 20px; color: green"></ha-icon>`;
else if (battery >= 20)
return `<ha-icon icon="mdi:battery-50" style="width: 20px; height: 20px; color: orange"></ha-icon>`;
else if (battery >= 1)
return `<ha-icon icon="mdi:battery-10" style="width: 20px; height: 20px; color: red"></ha-icon>`;
else
return `<ha-icon icon="mdi:battery-alert-variant-outline" style="width: 20px; height: 20px; color: darkred"></ha-icon>`;
\]\]\]
update: |
\[\[\[
return `<ha-icon icon="mdi:progress-clock" style="width: 20px; height: 20px;"></ha-icon>` + ’ Dernière M.A.J.';
\]\]\]
heure: |
\[\[\[
var entity = states\[‹ sensor.thermometre_bureau_last_seen ›\];
if (!entity) return ‹ N/A ›;
var lastSeen = entity.state;
if (lastSeen === ‹ unknown › || lastSeen === ‹ unavailable ›) return ‹ N/A ›;
return helpers.relativeTime(lastSeen);
\]\]\]
apex:
card:
type: custom:apexcharts-card
chart_type: radialBar
series:
- entity: sensor.thermometre_bureau_temperature
max: 40
color: « #00FF00 »
show:
legend_value: false
- entity: sensor.thermometre_bureau_humidity
max: 100
color: « #FEFEFE »
show:
legend_value: false
apex_config:
plotOptions:
radialBar:
offsetY: 0
hollow:
size: 70%
dataLabels:
name:
show: false
value:
show: false
track:
dropShadow:
enabled: true
top: 3
left: 0
blur: 4
opacity: 0.25
strokeWidth: 75%
margin: 3
fill:
type: gradient
gradient:
type: vertical
gradientToColors:
- « #E73E01 »
- « #0F9DE8 »
stops:
- 0
- 100
legend:
show: false
chart:
height: 100%
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
border: none;
}
graph:
card:
type: custom:mini-graph-card
name: Bureau
hours_to_show: 24
points_per_hour: 1
hour24: true
line_width: 2
decimals: 1
entities:
- entity: sensor.thermometre_bureau_temperature
name: Temp.
color: « #2a75cf »
- entity: sensor.thermometre_bureau_humidity
color: « #ffc04c »
name: Humidité
show_line: true
show_points: true
show_legend: true
y_axis: secondary
show:
fill: true
graph: line
icon: false
name: false
state: false
labels: false
extrema: true
average: true
card_mod:
style: |
ha-card {
background: none;
box-shadow: none;
border: none;
}
title: Suite parentale
grid_options:
columns: 48
rows: auto



Voici la carte de la tête thermostatique
type: custom:versatile-thermostat-ui-card
entity: climate.chauffage_parents
name: Parents
disable_circle: true
disable_auto: true
set_current_as_main: true
disable_power_infos: true
disable_auto_fan_infos: true
Merci d’avance pour le temps accordé.




