Hello everyone, I currently have some sensors like “history_stats” these I use to have a summary of the viewing time of content such as youtube, Netflix…
My question is, would it be possible that the time will only count if apart from what I indicate on the sensor so that it begins to count, the condition is that a plug is turned on? How could I do it?
Thank you for your help!
## Youtube
- platform: history_stats
name: Fire Tv - Time - Youtube
entity_id: sensor.fire_tv_content_type
state: "YouTube (FireTV)"
type: time
start: "{{ now().replace(hour=0).replace(minute=0).replace(second=0) }}"
end: "{{ now() }}"