nspanel-lovelace-ui
nspanel-lovelace-ui copied to clipboard
[Feature Request] operators for icon/color overrides
FEATURE DESCRIPTION
hello my question is whether it is possible with the following so if the state is between 21 degrees & 27 degrees then it should be orange is it more when it turns red see my config below I thought so the temperature and there behind <= to indicate between this state or can it also do others what do you think ?
ADDITIONAL CONTEXT
versie 1
weatherOverrideForecast1:
entity: sensor.openweathermap_forecast_temperature
color:
"-25<=": [255, 0, 255]
"-18<=": [138, 0, 138]
"-12<=": [128, 0, 128]
"-7<=": [0,0,255]
"-1<=": [135,206,236]
"4<=": [0, 128, 0]
"10<=": [144, 238, 144]
"16<=": [255, 2, 255]
"21<=": [255, 165, 0]
"27<=": [255, 69, 0]
"32<=": [255, 0, 0]
"38<=": [139, 0, 0]
Versie 2
weatherOverrideForecast1:
entity: sensor.openweathermap_forecast_temperature
state:
operator: <=
color:
"-25": [255, 0, 255]
operator: <=
"-18": [138, 0, 138]
operator: <=
"-12": [128, 0, 128]
operator: <=
"-7": [0,0,255]
operator: <=
"-1": [135,206,236]
operator: <=
"4": [0, 128, 0]
operator: <=
"10": [144, 238, 144]
operator: <=
"16": [255, 2, 255]
operator: <=
"21": [255, 165, 0]
operator: <=
"27": [255, 69, 0]
operator: <=
"32": [255, 0, 0]
operator: <=
"38": [139, 0, 0]
operator: <=
### PANEL / FIRMWARE VERION
Please add the Panel/Firmware Version you are using (EU)
This would be extremly useful. I am using the Panel besides other things to display my incoming solar power and battery feed. Battery feed can take positive and negative values, but the gridcard can only display 4 digits. The least significant one is cut away. Result is I do not know if my system get's 120 Watts to Battery or 1200 to 1209. So i would like to make any negative values red and any positive ones green, while scrapping the "-" in front, so i can see the total number.
Do you have an example for this done in the offical HomeAssistant UI? Would like to see how they are doing the config.
i will share this with you i use it in my dashboard
hello here is as promised the config of what it looks like in my dashboard that's how I would also like to use it with nspanel see photo of the card
type: custom:button-card
entity: sensor.multi_sensor_tarras_temperature
show_name: false
show_state: true
icon: hue:room-terrace
state:
- value: -25
operator: <=
color: rgb(255,0,255)
- value: -18
operator: <=
color: rgb(138,0,138)
- value: -12
operator: <=
color: rgb(128,0,128)
- value: -7
operator: <=
color: rgb(0,0,255)
- value: -1
operator: <=
color: rgb(135,206,236)
- value: 4
operator: <=
color: rgb(0,128,0)
- value: 10
operator: <=
color: rgb(144,238,144)
- value: 16
operator: <=
color: rgb(255,2,255)
- value: 21
operator: <=
color: rgb(255,165,0)
- value: 27
color: rgb(255,69,0)
operator: <=
- value: 32
color: rgb(255,0,0)
operator: <=
- value: 38
color: rgb(139,0,0)
operator: <=
styles:
card:
- height: 60px
- width: 60px
@joBr99 would this be how i see it? & this would also work nicely if that in cardgrid ?
hello @joBr99 are you going to get this sorted because see that it didn't go with this update so hope it will be okay?
hey is it possible to process this in the next update or is this more work ?