Hi, I have sonoff smart plug which count total energy in absolute value in kWh. What I want is, create multiple sensors for last 7 days which take last max value from that day. What came to mind is create utility meter with daily cycle and then statistic sensor with max value. But now I need complete it, where I probably need create my 7 sensors which they will take data from statistic sensor that take data from utility meter but from specific date. Can you help me with this. Thank you.
utility_meter:
energy:
source: sensor.plug_computer_energy_total
name: Computer - Total energy per hour
unique_id: sensor.um_computer_total_energy_per_hour
cycle: hourly
offset: 0
delta_values: false
net_consumption: false
sensor:
- platform: statistics
entity_id: sensor.computer_total_energy_per_hour
name: Computer - Max energy value per hour
unique_id: sensor.stat_computer_max_energy_value_per_hour
state_characteristic: value_max
sampling_size: 1
precision: 3
Hi Tom,
thank you for your answer. I definitely later create apex chart, thank you for this, but I want also too have these sensors, because I want later add to my button card template.