History stat not showing up

Hello, noob starting ha-project and got problem which googling didn’t help

Added to configuration.yaml next part

- platform: history_stats
name: lvv_on_today
entity_id: switch.lvvshelly
state: "on"
type: time
start: "{{ today_at() }}"
end: "{{ now() }}"

Switch.lvvshelly is shelly em3 switch. I don’t see that appearing in developer tools->states or in entities

Same problem with shelly s plug+, everything copy-pastes from examples and little modifications (name mostly), but nothing happens.

Need to create automation that if switch hasn’t been on for 24h (or 23.59h), it would send notification

Where exactly did you put that in your configuration.yaml file?

And is it indented like you have shown above?

Because that is not correct.

Looks like this

#
# Loads default set of integrations. Do not remove.
default_config:

# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes


automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml


- platform: template
  sensors:
 
*many rows of code between*

# Sensor for Riemann sum of energy consumption (W -> Wh)
- platform: integration
  source: sensor.power_consumption
  name: energy_consumption_sum
  unit_prefix: k
  round: 2
  method: left

# Example configuration.yaml entry
- platform: history_stats
  name: LVV_on_today
  entity_id: switch.lvvshelly 
  state: "on"
  type: time
  start: "{{ today_at() }}"
  end: "{{ now() }}"
  

You don’t appear to have a sensor: integration.

automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml

sensor:  # add this if it is not already in your configuration.yaml file
  - platform: integration
    source: sensor.power_consumption
    name: energy_consumption_sum
    unit_prefix: k

  - platform: history_stats
    name: lvv_on_today
    entity_id: switch.lvvshelly
    state: "on"
    type: time
    start: "{{ today_at() }}"
    end: "{{ now() }}"

Was wrong, it did appear. Big thanks, so easy thing and so easy to get wrong