I’m trying to integrate my dryer and washing machine into Home Assistant using their built-in power meters. My goal is to reliably determine the status of each appliance and receive notifications, for example, when the dryer is finished or the washing machine is running.
Problem:
Both appliances have three distinct operating states that can be identified based on their power consumption.
Here’s an example for the dryer:
Off: <= 1 watt
Idle/Standby: > 1 watt & < 10 watts
On/Running: >= 11 watts
Unfortunately, the power meter readings fluctuate slightly during operation. This means that even when the dryer is running (and should be consuming >11 watts), it might briefly report a value like 10 watts. This causes false status changes and inaccurate notifications.
To smooth out these fluctuations, I’ve already tried using the median sensor. While this helped somewhat, it didn’t completely solve the issue. Calculating the average power consumption over a longer period using get_history also didn’t work as expected. It seems Home Assistant only records the history of entities when their values change. For example, if the power consumption is 100 watts for 5 minutes and then drops to 1 watt for 1 second, only those two values are stored. This results in an inaccurate average of 50 watts.
Question:
Is there a way to make the status reporting for my washing machine and dryer more reliable despite these power fluctuations?
Has anyone else experienced similar issues and found a solution?
I’m open to solutions that can be implemented directly in Home Assistant or through Node-RED.
What power meter is this? Technology and update frequency? Best is usually to have a very high update interval on the device (like 0.1s) and actually have the calculations and states directly done on the power meter hardware and just exposed to HA like in this (esphome) example
I use some WiFi Tuya smart meters with the LocalTuya integration, which gives me the power usage. I tried to convert the power readings into three states, but my main problem is the occasional drops in power values.
I tried to manually inject values with timestamps every 2 seconds using Node-RED, but it didn’t work. I suspect this is because Home Assistant doesn’t save the values to the history if they haven’t changed, presumably to save space.
This didn’t work for me because the power usage fluctuates and sometimes falls into the ranges of other states, which incorrectly changes the entity state.