"State" option in entities row?

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?

No “maybe” about it. Entities cards do not support templates.

Could be this, but you are missing the row type , type: custom:template-entity-row

Ah yes, that was it.

And I know what happened. I previously was using this structure to show multiple cards as one block:

type: entities
entities:
  - type: custom:hui-markdown-card
    ...
  - type: custom:hui-entities-card
    entities:
      - type: custom:template-entity-row
        state: ...

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:

type: custom:stack-in-card
cards:
  - type: markdown
    ...
  - type: entities
    entities:
      - state: ...

And while I was doing that I was a bit too eager to remove the type: custom: lines.