29 / 5.000 consumption recording sensors

I miss the possibility of setting up an energy sensor for consumption, for example from sunset to sunrise. The possibility of setting up daily sensors, monthly sensors etc. is not quite there. I would like to measure how my consumption last night e.g. from 5:00 p.m. to 9:00 a.m. the next morning.
How can you do something like this?

Hi Stefan , Judging by your Topic Header, and your other few Topics Created

I will “also” here post the link to some very important notes, and help/tips
How to help us help you - or How to ask a good question.

Beside recommend you to use the search function, in top right corner

  1. First step would be, buy a “meter” (and provide info in regards to this Device)
  2. either use it’s sensors, or create additional template-sensors, or read the output of your meter sensor in a graph-card

That’s about what i can suggest, based on the info(lack of info) you provide

You do it with utility meter tariffs and an automation. See:

https://community.home-assistant.io/t/how-to-use-utility-meter-tariffs-to-conditionally-measure-things/706709

I did all my setup of counting daily and monthly with utility helpers and one automation.

4 utility meter (daily day, daily night, monthly day, monthly night) to count
ie:

sensor.energy_daily_sun_split_day

state_class: total
source: sensor.electricity_meter_value
status: collecting
last_period: 0.2
last_valid_state: 11945.3
meter_period: hourly
cron pattern: 0 * * * *
tariff: day
last_reset: 2024-05-24T11:00:00.014525+00:00
unit_of_measurement: kWh
device_class: energy
friendly_name: Energy daily sun split day

2 utility meter (one for daily , one for monthly) to do the selection between day/night

select.energy_daily_sun_split

options: day, night
friendly_name: Energy daily sun split

Automation to select the day or night depending of the sun.

alias: Switch Day Night for energy daily sun split
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.night
    to: "on"
    from: "off"
    id: night
  - platform: state
    entity_id:
      - binary_sensor.night
    from: "on"
    to: "off"
    id: day
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: day
        sequence:
          - service: select.select_option
            data:
              option: day
            target:
              entity_id: select.energy_daily_sun_split
          - service: select.select_option
            data:
              option: day
            target:
              entity_id: select.energy_monthly_sun_split
      - conditions:
          - condition: trigger
            id: night
        sequence:
          - service: select.select_option
            data:
              option: night
            target:
              entity_id: select.energy_daily_sun_split
          - service: select.select_option
            data:
              option: night
            target:
              entity_id: select.energy_monthly_sun_split
mode: single