MyStrom Smart Switch in Energy Consumption Overview Page

Hello,
I have a huge problem as I despair.

How can I create a sensor for the mystrom Wifi Switch that shows me the daily consumption.
At night it should be set to 0.
My sensor for the current production in W is called “sensor.mystrom_power”

I have created a counter helper that resets daily and then a Riemann sum integrator for the conversion into Wh, but it keeps counting on the dashboard…

thanks…

Hi softplus

Thanks for your code, works perfect with my myStrom switch.

How can I reset the couter of the energy consumption, so that it starts from “0 kwh” again?

Best Regards
Stephan

Good evening,
I have the same problem. I have 2 myStrom switches on 2 PV systems. I copied and pasted one in configuration.yaml and then changed the names, but that doesn’t work. Could someone please tell me what it should look like with 2 switches.
LG