File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed
Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -288,13 +288,10 @@ async def createDevices(self):
288288 for code in product_list :
289289 eval ("self." + code )
290290
291- if self .data .products [aProduct ]["type" ] in HIVE_TYPES ["Heating" ]:
292- self .config .mode .append (p ["id" ])
293-
294- if self .data .products [aProduct ]["type" ] in HIVE_TYPES ["Switch" ]:
295- self .config .mode .append (p ["id" ])
296-
297- if self .data .products [aProduct ]["type" ] in HIVE_TYPES ["Light" ]:
291+ hive_type = (
292+ HIVE_TYPES ["Heating" ] + HIVE_TYPES ["Switch" ] + HIVE_TYPES ["Light" ]
293+ )
294+ if self .data .products [aProduct ]["type" ] in hive_type :
298295 self .config .mode .append (p ["id" ])
299296
300297 for aDevice in self .data ["devices" ]:
@@ -304,10 +301,8 @@ async def createDevices(self):
304301 for code in device_list :
305302 eval ("self." + code )
306303
307- if (
308- self .data ["devices" ][aDevice ]["type" ] in HIVE_TYPES ["Thermo" ]
309- or self .data ["devices" ][aDevice ]["type" ] in HIVE_TYPES ["Sensor" ]
310- ):
304+ hive_type = HIVE_TYPES ["Thermo" ] + HIVE_TYPES ["Sensor" ]
305+ if self .data ["devices" ][aDevice ]["type" ] in hive_type :
311306 self .config .battery .append (d ["id" ])
312307
313308 if "action" in HIVE_TYPES ["Switch" ]:
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def requirements_from_file(filename="requirements.txt"):
1515
1616
1717setup (
18- version = "0.3.8 " ,
18+ version = "0.3.9 " ,
1919 package_data = {"data" : ["*.json" ]},
2020 include_package_data = True ,
2121 cmdclass = {
You can’t perform that action at this time.
0 commit comments