Bonjour,
depuis la mise à jour 2024.1.0, la configuration de mes badges n’est plus prise en compte
la couleur de fond et la couleur du texte ne s’affiche pas,
ci-dessous une partie de mon code
badges:
- entity: person.lucien_mornet
- entity: sun.sun
style: |
:host {
{% if states('sun.sun') %}
--label-badge-text-color: yellow;
--label-badge-background-color: black;
{% endif %}
}
- entity: light.lampe_buandrie
name: Lampe radiation
style: |
:host {
{% if states('sensor.radiation_solaire_weewx') | float > 700 %}
--label-badge-background-color: red;
{% elif states('sensor.radiation_solaire_weewx') | float > 600 %}
--label-badge-background-color: orange;
{% elif states('sensor.radiation_solaire_weewx') | float > 500 %}
--label-badge-background-color: yellow;
{% elif states('sensor.radiation_solaire_weewx') | float > 400 %}
--label-badge-background-color: magenta;
{% elif states('sensor.radiation_solaire_weewx') | float > 300 %}
--label-badge-background-color: green;
{% elif states('sensor.radiation_solaire_weewx') | float > 200 %}
--label-badge-background-color: cyan;
{% else %}
--label-badge-background-color: blue;
{% endif %}
- entity: sensor.couleur_tempo_edf
name: Tempo EDF
style: |
:host {
{% if states('sensor.tempo_aujourd_hui') | string == 'TEMPO_BLEU' %}
--label-badge-text-color: blue;
--label-badge-background-color: blue;
{% elif states('sensor.tempo_aujourd_hui') | string == 'TEMPO_BLANC' %}
--label-badge-text-color: white;
--label-badge-background-color: white;
{% else %}
--label-badge-text-color: red;
--label-badge-background-color: red;
{% endif %}
}
une idée
merci pour votre aide