History_stats problem

Hi All, sorry it’s me again…

This time with a template question

I have a (working) sensor in the ESPHome integration that returns a single digit numerical result, and I would like to know how many hours every day the sensor have the status ‘3’

And I have this template in my configurations.yaml

- platform: history_stats
    name: Kompressor tid
    entity_id: sensor.compressor_status
    state: 3
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0) }}"
    end: "{{ now() }}" 

But when I check the status of the template in developer tools, the counter always remains on 0 hours…

state: '3'

@vingerha Tried that, also “3”, same result, counter remains at zero

Sorry all, my own bad, spell checking sensor ID’s actually makes a difference some times :wink: