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

@@ -420,7 +420,14 @@ func (c *Client) GetStatus() (*Status, error) {
return &Status{Connected: false}, nil
}
return c.lastStatus, nil
// Check if device is actually alive
// If no antennas and all values are default, device is probably off
status := *c.lastStatus
if len(status.Antennas) == 0 || (status.PortA != nil && status.PortA.Source == "" && status.PortB != nil && status.PortB.Source == "") {
status.Connected = false
}
return &status, nil
}
// SetAntenna sets the antenna for a specific port