pyhausbus 1.0.7__py2.py3-none-any.whl → 1.0.9__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pyhausbus/Templates.py CHANGED
@@ -9,15 +9,15 @@ def load_file(path: str) -> list[str]:
9
9
  with open(path, "r", encoding="latin1") as file:
10
10
  return [line.strip() for line in file if line.strip()]
11
11
  except FileNotFoundError:
12
- print(f"Datei nicht gefunden: {path}")
12
+ LOGGER.error(f"Datei nicht gefunden: {path}")
13
13
  return []
14
14
  except Exception as e:
15
- print(f"Fehler beim Laden der Datei {path}: {e}")
15
+ LOGGER.error(f"Fehler beim Laden der Datei {path}: {e}")
16
16
  return []
17
17
 
18
18
  class Templates:
19
19
  template_root_dir = os.path.join(os.path.dirname(__file__), "templates")
20
- LOGGER.debug(f"templateRootDir = {self.template_root_dir}")
20
+ LOGGER.debug(f"templateRootDir = {template_root_dir}")
21
21
  filter_non_existing = True
22
22
  _instance = None
23
23
  class_mappings: Dict[str, str] = {}
@@ -90,10 +90,10 @@ class Templates:
90
90
  return None
91
91
 
92
92
  def getModuleName(self, firmwareId: EFirmwareId, fcke: int):
93
- for entry in self.module_types:
94
- if entry.suits(firmwareId, fcke):
95
- return entry.name
96
- return None
93
+ for entry, name in self.module_types.items():
94
+ if entry.suits(firmwareId, fcke):
95
+ return name
96
+ return None
97
97
 
98
98
  def get_features(self, firmware_id, fcke) -> Optional[List['FeatureEntry']]:
99
99
  for module_type, features in self.feature_names.items():
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyhausbus
3
- Version: 1.0.7
3
+ Version: 1.0.9
4
4
  Summary: Python based library for accessing haus-bus.de modules. Inteded to be used in a Home Assistant integration.
5
5
  Home-page: https://haus-bus.secure-stores.de/
6
6
  Author: Hermann Hoeschen
@@ -630,10 +630,10 @@ pyhausbus/templates/SD485_2E_6-fach-Taster.tpl,sha256=d8ALY9k1pcNSQUGSqSUsIpiRva
630
630
  pyhausbus/templates/SD485_2F_6-fach-Taster.tpl,sha256=d8ALY9k1pcNSQUGSqSUsIpiRvaR0bqoy4onhpfF7bzA,533
631
631
  pyhausbus/templates/SD6_14_Multitaster.tpl,sha256=cneNlLhmyE0RSh1BQK5p8Gz2cRbDOFztfc1_XWy3fAY,451
632
632
  pyhausbus/templates/SD6_1E_Multitaster.tpl,sha256=cneNlLhmyE0RSh1BQK5p8Gz2cRbDOFztfc1_XWy3fAY,451
633
- pyhausbus/Templates.py,sha256=gtghruC2mTbvzUQ_7bTiIvK4Rnq81NzRuMdbbQNIg8U,5644
633
+ pyhausbus/Templates.py,sha256=Bxq2DLtb04Ga4UqgeZjoy0rWpLGQ-BKN6Loj10VnxzI,5655
634
634
  pyhausbus/UdpReceiveWorker.py,sha256=lQD2O2Rqk3Xvy6Glrlbn1p2n4ZTWW80yxJp3-OsQTcc,2678
635
635
  pyhausbus/WeekTime.py,sha256=o30XyAOEYAQhcWdE2hEX685RNJmo-VCQNPEx1xAFwzk,1287
636
- pyhausbus-1.0.7.dist-info/LICENSE,sha256=LrguBvqK4LI4RXcja3oOYNPAIB5x5HPUXHRlkTkP5Sg,1094
637
- pyhausbus-1.0.7.dist-info/METADATA,sha256=NDThp0QVotdWwbJPkOEKF_jt0_EiRRmFooWoagwpLgE,1324
638
- pyhausbus-1.0.7.dist-info/WHEEL,sha256=iAMR_6Qh95yyjYIwRxyjpiFq4FhDPemrEV-SyWIQB3U,92
639
- pyhausbus-1.0.7.dist-info/RECORD,,
636
+ pyhausbus-1.0.9.dist-info/LICENSE,sha256=LrguBvqK4LI4RXcja3oOYNPAIB5x5HPUXHRlkTkP5Sg,1094
637
+ pyhausbus-1.0.9.dist-info/METADATA,sha256=z77YST0u0-UsI_weUueH14cSUf6dDzjuncUoRIGMqEA,1324
638
+ pyhausbus-1.0.9.dist-info/WHEEL,sha256=iAMR_6Qh95yyjYIwRxyjpiFq4FhDPemrEV-SyWIQB3U,92
639
+ pyhausbus-1.0.9.dist-info/RECORD,,