I am using custom Bar-card to view the usage of my electricity, I have a Pv system which produces electricity during day time, if there is more electricity produced with my PV system then I feed in electricty to the grid, which gives a negative value.
I would like to configure the bar card to show green color when feeding in and red color when buying from grid.
Below I have some screenshots so you can see how it is currently configured. Maybe someone has an idea how to configure this.
Ok thanks I didn’t see that before.
Trying to use the severity paramater, but not sure how this works:
entities:
- min: ‘0’
max: ‘5499’
severity:
from: -0
to: -5000
color: green
icon: mdi:transmission-tower-import
name: Energy from Grid
The thing is that I am having negative or positive values, I guess I can’t define the severity paramater twice in the config? Any idea how I need to configure, also now sure how to configure the range for min and max since it could be negative or positive value.
I am using the bars as a simple colour indication for temperature but the same principle applies to your task, by setting the values of the card to your energy values, you can select the colour you might like to see.