Salut
J’avance
Petite question : je voudrais savoir si je peux faire une barre de progression qui irait soit à droite quand la valeur est positive, soit a gauche quand la valeur est négative (pour afficher mon bilan import/export production conso soalire)
Si en plus on pouvait mettre une couleur d’un côté, et une autre de l’autre, ce serait le top
Ou alors faire bouger la barre progression vert quand positif, et rouge comme négatif par ex
C’est possible ?
Mon script actuel
card_mod:
style:
ha-icon $: |
ha-svg-icon {
margin-top: 7px;
margin-left: 7px;
}
.: |
ha-card {
margin-top: -20px;
margin-left: -10px;
margin-right: -5px;
background: none;
}
bar-card-currentbar, bar-card-backgroundbar {
border-radius: 15px;
border: 1px rgba(0,0,0,1.0) outset;
box-shadow: 2px 2px 4px 0px rgba(0,0,0,0.5);
}
bar-card-name {
margin: 5px;
}
ha-icon {
margin-top: -15px;
margin-left: 0px;
width: 42px;
height: 38px;
box-shadow: 2px 2px 4px 0px rgba(0,0,0,0.5) !important;
border: 1px rgba(0,0,0,1.0) outset !important;
border-radius: 50px;
}
title: Production énergie
type: custom:bar-card
entities:
- entity: sensor.prod_solaire_ha
name: Production solaire
icon: mdi:flash
color: red
height: 27px
min: "0"
max: "6000"
target: "0"
decimal: 0
positions:
name: inside
indicator: "off"
- entity: sensor.solaredge_m1_ac_power
name: Bilan solaire
icon: mdi:flash
color: red
height: 27px
min: "-6000"
max: "6000"
target: "0"
decimal: 0
positions:
name: inside
indicator: "off"