Zaptec: fix identifier

This commit is contained in:
andig 2025-03-27 14:45:44 +01:00
parent 7375832350
commit ee157ee447

View file

@ -309,7 +309,11 @@ func (c *Zaptec) Identify() (string, error) {
return "", err
}
return res.ObservationByID(zaptec.ChargerCurrentUserUuid).ValueAsString, nil
if id := res.ObservationByID(zaptec.ChargerCurrentUserUuid); id != nil {
return id.ValueAsString, nil
}
return "", nil
}
var _ api.Diagnosis = (*Zaptec)(nil)