Popular AC energy monitor PZEM-004T is powered from AC side. In result when measured AC power is lost, values are not updated at all and esphome still remembers last received values and in result e.g. in HA frontend you still see “230V” instead of “not available” or just “0V”.
Do you know any method how to add expiration time here, similar as it is in mqtt sensor?
Are you talking about a situation where the PZEM-004T loses power but the ESP is still powered? In my case it’s all powered from the same source, so it indeed does go unavailable when power is lost (although that means my network is also down, so it doesn’t really matter anyway).
Gotcha. Any reason you can’t power it from the same circuit it’s measuring? That’s what I ended up doing, partly because I needed a new outlet to power the ESP anyways and also to make it foolproof to isolate it all during install/anything else.
Mostly due to fact that in my case PZEM is only a part of bigger device and it measures just one (important for me) AC output controlled by this device. So it has to be independent: working ESP still performing other functions and able to report that there is no power on this line (it can be loss also due to other reasons).
Totally makes sense. I’d actually considered putting my ESP on a battery (if I ever put my WiFi on a UPS) so I could track outages. Interested if you ever find a good solution, since I wasn’t aware this would happen when AC power is lost.
FR is reported one year ago and no reaction? So it seems, rather no chance for bug fix in the integration… It’s a pity, because it should be easy to make such a change.
I was thinking about such hardware solution by own, but unfortunately I found this problem after building my device, not during, dismounting them and making such modifications is currently a bit too complicated
At this point in time over 1000 open feature request do exist. On the other hand also more than 1000 feature request are closed but indeed, opening a FR is easier than closing it
Well - quite the opposite! It’s a open source project so everybody (including you ) can “fix” this (or add the wanted function) and send the pull request upstream
Maybe there is way to work’a’round it by software with filters or something