diff --git a/custom_components/battery_notes/library.py b/custom_components/battery_notes/library.py index 33b771bb8..f8a1c4b1b 100644 --- a/custom_components/battery_notes/library.py +++ b/custom_components/battery_notes/library.py @@ -56,8 +56,10 @@ async def get_device_battery_details( if self._devices is not None: for device in self._devices: if ( - device["manufacturer"].casefold() == manufacturer.casefold() - and device["model"].casefold() == model.casefold() + str(device["manufacturer"] or "").casefold() + == str(manufacturer or "").casefold() + and str(device["model"] or "").casefold() + == str(model or "").casefold() ): device_battery_details = DeviceBatteryDetails( manufacturer=device["manufacturer"], diff --git a/custom_components/battery_notes/manifest.json b/custom_components/battery_notes/manifest.json index 56ed7af67..8251b1c7f 100644 --- a/custom_components/battery_notes/manifest.json +++ b/custom_components/battery_notes/manifest.json @@ -9,5 +9,5 @@ "integration_type": "device", "iot_class": "calculated", "issue_tracker": "https://github.com/andrew-codechimp/ha-battery-notes/issues", - "version": "1.1.0" + "version": "1.1.1" } \ No newline at end of file