Skip to content

Commit abd53b5

Browse files
committed
Stop thermostat appliance collection when the module is not present
1 parent 80a2e51 commit abd53b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugwise/common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ def _appl_thermostat_info(
117117
locator = "./logs/point_log[type='thermostat']/thermostat"
118118
xml_2 = return_valid(xml_2, self._domain_objects)
119119
module_data = self._get_module_data(xml_1, locator, xml_2)
120+
if not module_data["contents"]:
121+
return Munch() # no module-data present means the device has been removed
122+
120123
appl.vendor_name = module_data["vendor_name"]
121124
appl.model = module_data["vendor_model"]
122125
if (

0 commit comments

Comments
 (0)