I can see in the Energy usage how much I have consumed per hour. Is it possible to access those datas?
I want to know how much I consumed from sunset to sunrise, or from that hour the sun set and to the hour the sun rised.
Depends on your needs you may either need to setup a utility meter integration to compile the correct sensors into one measurement or you may be able to get what yih want out of History Stats.
i personally have a few utility meters running so I can also easily track costs across multiple tariff stripes (peak/off peak) at the same time - for quick where am I at now data for instance.
In short there’s options but not one size fits all. You’ll need to describe the end results you want and people can help you figure out best path.
A Utility Meter do not seems to have the possibility to store data from a specific time to a specific time.
As I wrote, “I want to know how much I consumed from sunset to sunrise”
A template triggered sensor that only calculates consumed energy between sunset and sunrise.
I added this automation and it seems to work. Next I want to do is to set a utility meter using input_number.kwhduringnight and reset it every day at noon.
alias: kwhduringnight
description: ""
trigger:
- platform: state
entity_id:
- sensor.growatt_total_load_kwh
condition:
- condition: sun
after: sunrise
before: sunset
action:
- action: input_number.set_value
metadata: {}
data_template:
value: "{{ states('sensor.growatt_load_kwh') }}"
target:
entity_id: input_number.kwhduringnight
enabled: true
mode: single