I have this entities card that is supposed to show the difference between two entities. The code I’m using is:
type: entities
entities:
- icon: mdi:water-opacity
name: Rain so far
state: >-
{{ ((states('sensor.rain_meter_pulses')|int -
states('input_number.previous_rain_pulses')|int)) }} pulses
entity: sensor.rain_meter_pulses
I just noticed that the difference doesn’t work anymore, it simply shows the value of sensor.rain_meter_pulses. I realize that the entities card does not have an option named state.
However, I’m sure that this exact code worked at some point. Does this state option ring a bell with anyone? Was I maybe using some custom “extended” entities card?
I had an issue with this setup where the markdown sometimes wasn’t rendered and I figured it’s probably because that structure is considered a terrible hack, so I changed it to this structure: