Attribute won't work with History Stats

Why can’t I use this attribute: fan in history_stats but I can use it in an Automation?

  - platform: history_stats
    name: AC West Dialy Ontime
    entity_id: climate.west_wing
    attribute: fan    
    state: "on"
    type: time
    start: "{{ now().replace(hour=0, minute=0, second=0) }}"
    end: "{{ now() }}"

Because nowhere here does it say that attributes are supported. They aren’t. You will have to make a template binary sensor.

Okay thanks,

  • platform: history_stats
    name: AC West Dialy Ontime
    entity_id: ({“entity”:“climate.west_wing”,“attribute”:“fan”})
    attribute: fan
    state: “on”
    type: time
    start: “{{ now().replace(hour=0, minute=0, second=0) }}”
    end: “{{ now() }}”

No you cant use templates for the entity it. You have to create a template sensor.

Ok Thanks.