Fix serial in Flo device information (#103427)

This commit is contained in:
Michael 2023-11-05 12:41:15 +01:00 committed by Franck Nijhof
parent f45114371e
commit e56e75114a
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3

View File

@ -139,9 +139,9 @@ class FloDeviceDataUpdateCoordinator(DataUpdateCoordinator):
return self._device_information["fwVersion"]
@property
def serial_number(self) -> str:
def serial_number(self) -> str | None:
"""Return the serial number for the device."""
return self._device_information["serialNumber"]
return self._device_information.get("serialNumber")
@property
def pending_info_alerts_count(self) -> int: