J’ai l’impression qu’il y a une partie de code qui correspond à une autre carte sun Card.
https://community.home-assistant.io/t/lovelace-sun-card/109489
La carte utilisée ici est celle de https://github.com/AitorDB/home-assistant-sun-card et sa configuration est différente.
Les codes suivant apportent le même résultat
type: custom:stack-in-card
title: Suivi du soleil
mode: vertical
cards:
- type: horizontal-stack
cards:
- type: vertical-stack
cards:
- type: custom:compass-card
language: fr
indicator_sensors:
- sensor: sun.sun
attribute: azimuth
indicator:
type: circle
color: orange
dynamic_style:
sensor: sun.sun
attribute: elevation
bands:
- from_value: 0
show: true
value_sensors:
- sensor: sun.sun
attribute: elevation
units: °
decimals: 1
compass:
circle:
background_image: \local\community\compass-card\home.png
background_opacity: 0.5
north:
show: true
offset: 0
east:
show: true
west:
show: true
south:
show: true
- type: markdown
content: |
<center>Azimuth: {{ state_attr('sun.sun', 'azimuth') }}°</center>
<center>Saison: {{ states("sensor.saison") }}</center>
- type: custom:sun-card
card_mod:
style: |
.sun-card-footer .sun-card-text-subtitle {
font-size: 1rem !important;
color: var(--primary-text-color) !important;
}
.sun-card-header .sun-card-text-subtitle {
font-size: 1rem !important;
color: var(--primary-text-color) !important;
}
.sun-card-header .sun-card-text-time {
font-size: 1.1rem !important;
color: var(--primary-text-color) !important;
}
.sun-card-footer .sun-card-text-time {
font-size: 1.1rem !important;
color: var(--primary-text-color) !important;
}
sun:
sensor:
- platform: template
sensors:
saison:
value_template: >
{% if is_state("sensor.season", "spring") %}
Printemps
{% elif is_state("sensor.season", "summer") %}
Eté
{% elif is_state("sensor.season", "autumn") %}
Automne
{% else %}
Hiver
{% endif %}