Introduction
When I started my first home automation project, everything was still new and it was great when a light sensor immediately switched on the lighting when the lumen level was too low.
After creating several automations, it was not always clear whether a malfunction was caused by the (light) sensor or the actuator (broken lamp?). Time to build in an extra step: the light sensor indicates that it is getting dark and now switches a Boolean (Light On) from False to True. Followed by a second automation; When boolean (Light On) becomes True, lighting turns on. In the event of a malfunction, the value of the boolean provides the answer: sensor or lighting broken. I now frequently use booleans for situations where a status needs to be (temporarily) preserved.
It soon became time to see if another annoyance could also be solved with home automation. Perhaps you can relate? It’s laundry day, the washing machine has started, you do some other things or go out for a while, and hours later you realise that the laundry could have been taken out of the machine long ago. The wish was to send a notification to the phone after the end of the wash programme and also to play music in the house every 10 minutes until the laundry was taken out of the machine.
I won’t repeat my first solution, which I built when I was still using Homey. Just like with Homey, the washing machine is connected to a smart plug that can measure power consumption. But what now?
My solution is not to think in binary terms (the washing machine is off OR the washing machine is on and working), but in ternary terms and to add a phase: the laundry is ready (that is the phase when the laundry can be taken out of the machine).
The following graph shows a typical wash cycle; at the bottom, the power consumption in watts is plotted against time, and at the top, the status of the washing machine.




