Counting how many times a sensor reaches an ammoun

Hello everybody !

a question, i have a power plug that can monitor the wattages and now i wanna count how many times on a day a certain wattages (4 watts) has reached.

So a counter that tells me how many times a day it has reaches 4 watts.

Make a template sensor that turns on when the power is 4W or greater.

Your template for the sensor state will be something like:

state: "{{ states('sensor.your_power_sensor_here')|float >= 4 }}"

Use the history statistics sensor to count how many time it turns on, or if you prefer, how long it has been on in a specified time period.

Or use an automation that updates a counter every time you reach 4W.

1 Like