History_stats, can it be conditional?

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?

Yes, a template binary sensor for use with the history stats sensor is the solution.

value_template: "{{ is_state('binary_sensor.tablet_interactive', 'on') and is_state('input_boolean.parents_using', 'off') }}"

Ok… I was hoping I could get away without that entity.
But conditions to the history_stats could actually be quite useful.

The only options you can use with the history stats integration are listed on the page you linked to.

You know what to do.