We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8f4dd97 commit a78b751Copy full SHA for a78b751
1 file changed
plugwise/util.py
@@ -13,6 +13,7 @@
13
ELECTRIC_POTENTIAL_VOLT,
14
ENERGY_KILO_WATT_HOUR,
15
HW_MODELS,
16
+ LOGGER,
17
OBSOLETE_MEASUREMENTS,
18
PERCENTAGE,
19
POWER_WATT,
@@ -28,7 +29,7 @@
28
29
SpecialType,
30
SwitchType,
31
)
-
32
+from plugwise.exceptions import DataMissingError
33
from defusedxml import ElementTree as etree
34
from munch import Munch
35
@@ -93,6 +94,9 @@ def check_heater_central(xml: etree.Element) -> str:
93
94
if heater_central.find("name").text == "Central heating boiler":
95
hc_list.append({hc_id: has_actuators})
96
97
+ if not hc_list:
98
+ raise DataMissingError("No Central heating boiler found, please create an Issue")
99
+
100
heater_central_id = list(hc_list[0].keys())[0]
101
if hc_count > 1:
102
for item in hc_list: # pragma: no cover
0 commit comments