We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f20faf4 commit 5c4f838Copy full SHA for 5c4f838
custom_components/battery_notes/library.py
@@ -108,6 +108,9 @@ async def get_device_battery_details(
108
):
109
matching_devices.append(device)
110
111
+ if matching_devices is None or not matching_devices or len(matching_devices) == 0:
112
+ return None
113
+
114
# Check if any matching devices have specified hw_version
115
for device in matching_devices:
116
if device.get("hw_version", "").casefold() == str(model_info.hw_version or "").casefold():
0 commit comments