Skip to content

Commit 833b557

Browse files
committed
check if check_versions is none
1 parent d1dc0c6 commit 833b557

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

custom_components/mammotion/coordinator.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -807,10 +807,10 @@ async def _async_setup(self) -> None:
807807
ota_info = await device.mammotion_http.get_device_ota_firmware(
808808
[device.iot_id]
809809
)
810-
if ota_info is not None:
811-
for check_version in ota_info.data:
812-
if check_version.device_id == device.iot_id:
813-
device.state.update_check = check_version
810+
if check_versions := ota_info.data:
811+
for check_version in check_versions:
812+
if check_version.device_id == device.iot_id:
813+
device.state.update_check = check_version
814814

815815
except DeviceOfflineException:
816816
"""Device is offline bluetooth has been attempted."""

0 commit comments

Comments
 (0)