Help with rule: count how much time a device is ON during each day
I would like to know how much time a certain device is ON during each day. Idea is at the end of the day a message is sent with this information.
My problem is that this device is switching ON and OFF several times during the day. So I need to do additions to a cumulative time variable for the periods it is ON and don't know how.
Any of you have done something similar?
I want to apply this for my heating boiler.