@szucs.krisz wrote:
I’m trying to add a sensor to see the last time, my heat turned on.
The attribute of the sensors, I’d like to read is:
entity: sensor.pump
states: ‘Kikapcsolva’ / ‘Bekapcsolva’I’d like the xy minutes ago to read when the sensor turned to ‘Bekapcsolva’ state.
I couldn’t find any solution, then I turned to “states.sensur.pump.last_changed” soution. It is a bit confusing, because it will be reset in both states, but I gave it a try.ngbs_turned_on1:
friendly_name: Minutes ago
value_template: “{{ ((as_timestamp(now()) - as_timestamp(states.sensor.pump.last_changed))) | round(0) }}”The problem is, it is not changing. It does reset the counter, when the sate changes, but the counter doesn’t rise. It keeps showing me 0.
It’s like the as_timestamp(now()) not reading the correct timestamp.
If anyone has any idea, or a better solution to read ‘Bekapcsolva’ state, I’d be really glad.
Posts: 7
Participants: 4