esphome / issues

Issue Tracker for ESPHome
https://esphome.io/
291 stars 36 forks source link

ESPHOME stayed at last values if no communication with Peacefair PZEM-016. #3977

Closed mishomvp closed 1 year ago

mishomvp commented 1 year ago

The problem

Hello,

I use PZEM-016, but yesterday I found out that after the communication between the UART and the RS485 is broken, the last measured values remain and the only way to know about it is that you can see a "straight line in the graphs" or restart ESP32. It would be good if communication between PZEM-016 and the UART, broken ESPHOME to show value "Unavailable" and stops writing data to the database. Thanks in advance!

Which version of ESPHome has the issue?

2022.12.3

What type of installation are you using?

Home Assistant Add-on

Which version of Home Assistant has the issue?

2022.12.8

What platform are you using?

ESP32

Board

ESP32-EVB

Component causing the issue

RS485, Peacefair PZEM-016

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

ssieb commented 1 year ago

There's no way for esphome to tell HA that it's not available. The closest option would be to publish NaN after a certain number of update intervals with no data.

mishomvp commented 1 year ago

Okay. My idea is simply to not have wrong data being written to the database.

ssieb commented 1 year ago

It's not being written. HA is just showing the last value received.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.