This commit is contained in:
2026-01-10 09:31:46 +01:00
parent eee3f48569
commit 5fd81a641d
3 changed files with 20 additions and 1 deletions

View File

@@ -164,6 +164,12 @@ func (c *Client) pollLoop() {
// Mark as connected
status.Connected = true
// Check if device is actually alive (not just TCP connected)
// If voltage is 0 and temperature is 0, device is probably off
if status.Voltage == 0 && status.Temperature == 0 {
status.Connected = false
}
// Peak hold logic - keep highest power for 1 second
now := time.Now()
if c.lastStatus != nil {