I’m trying to create a template sensor to calculate the difference between 2 states for an entity.
the entity itself just is an ever increasing value
I tried adding the template sensor below , but the sensor is allways unknown
`template:
- trigger:
- platform: state
entity_id:- sensor.airco_keuken_energy
sensor:
- sensor.airco_keuken_energy
- name: “Current Airco Keuken Power Current State”
state: “{{ trigger.to_state.state - trigger.from_state.state | float | round(2)}}”
`
- platform: state