esphome / esphome/feature-requests
last reading value stayed - pzemac
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
**Whenever mains fail voltage value showing last value and stay last reading value**
**Please describe your use case for this integration and alternatives you've tried:**
**I have automation for when any phase fail or under voltage/over voltage. I have tried arduino ide with PZEM004Tv30.h lib., and the following line inclueded in my project code working fine but using esphome yaml not working **
`if (isnan(voltage)) {
voltage = 0.0; // If nan, set voltage to zero
}`
**Additional context**
Whenever mains fail or under voltage/over voltage threshold what I set to trip, the relay not turn on due to last value(voltage) stayed for examble(Sensor PZEM004T, V3) present voltage reading is 220V when suddenly mains fail this value has not reset or zero stay its last reading of value here 220v, due to this relay not turn on, so i want whenver mains fail or sensor disconnected from esp mcu voltage value must show zero.
Contributor guide
No contributing guide indexed for this repository
Research direction
No repository files or tests are named. Start by locating the ESPHome PZEM sensor integration and comparing its behavior with the PZEM004Tv30.h Arduino example; done should mean a mains failure or sensor disconnect reports zero rather than the previous voltage so the relay automation can trigger.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- yaml
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100