hello
I need to change a picture opacity in config-template-card.
I have a following code:
- type: custom:config-template-card
variables:
C: states['sensor.ga_kazan_temperature_4_pump_furnace'].state
CUTOFF: states['input_number.kazan_on_temperature'].state
entities:
- sensor.ga_kazan_temperature_4_pump_furnace
- input_number.kazan_on_temperature
card:
type: picture
image: /local/pic/futes/fire.gif
style:
top: 79%
left: 91%
width: 7%
opacity: ${C-CUTOFF}
if i change manually the opacity the picture is appearing and despairing as i expecting.
- opacity: -4
- opacity: -0.3
- opacity: 0.5
- opacity: 4
But not with ${C-CUTOFF}
If i print out the value for ${C-CUTOFF} is “-4” but the picture still visible. I wonder what is the problem here?
As a workaround i just changing the picture:
image: >-
${ C-CUTOFF>0 ? '/local/pic/futes/fire.gif' :
'/local/pic/futes/fire-black.gif'}
thank you