I’m about to add a history_stats sensor.
Is there any way to configure it to be conditional?
- platform: history_stats
name: Tablet on time
entity_id: binary_sensor.tablet_interactive
state: 'on'
type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'
^^ works, but what I want is something like:
- platform: history_stats
name: Tablet on time (kids only)
entity_id: binary_sensor.tablet_interactive
state: 'on'
condition:
entity_id: input_boolean.parents_using
state: off
type: time
start: '{{ now().replace(hour=0, minute=0, second=0) }}'
end: '{{ now() }}'
Or is the only option to have a template binary sensor that evaluates the condition and interactive and becomes the “kids interactive” that I then use the history_stats on?