log value of register 0x07 when register 0x0D not available
This commit is contained in:
parent
445f508ea5
commit
2e51380be5
|
|
@ -92,6 +92,11 @@ def get_battery(device):
|
||||||
else None)
|
else None)
|
||||||
return charge, status
|
return charge, status
|
||||||
|
|
||||||
|
reply = get_register(device, 'battery_status', 0x07)
|
||||||
|
if reply:
|
||||||
|
battery_status = ord(reply[:1])
|
||||||
|
_log.info("%s: battery status %02X", device, battery_status)
|
||||||
|
|
||||||
|
|
||||||
def get_serial(device):
|
def get_serial(device):
|
||||||
if device.kind is None:
|
if device.kind is None:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue