File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 1313 ELECTRIC_POTENTIAL_VOLT ,
1414 ENERGY_KILO_WATT_HOUR ,
1515 HW_MODELS ,
16+ LOGGER ,
1617 OBSOLETE_MEASUREMENTS ,
1718 PERCENTAGE ,
1819 POWER_WATT ,
2829 SpecialType ,
2930 SwitchType ,
3031)
31-
32+ from plugwise . exceptions import DataMissingError
3233from defusedxml import ElementTree as etree
3334from munch import Munch
3435
@@ -93,6 +94,9 @@ def check_heater_central(xml: etree.Element) -> str:
9394 if heater_central .find ("name" ).text == "Central heating boiler" :
9495 hc_list .append ({hc_id : has_actuators })
9596
97+ if not hc_list :
98+ raise DataMissingError ("No Central heating boiler found, please create an Issue" )
99+
96100 heater_central_id = list (hc_list [0 ].keys ())[0 ]
97101 if hc_count > 1 :
98102 for item in hc_list : # pragma: no cover
You can’t perform that action at this time.
0 commit comments