boneIO 0.3.0.dev4__py3-none-any.whl → 0.3.0.dev5__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.
boneio/cover.py CHANGED
@@ -4,6 +4,7 @@ import logging
4
4
  from typing import Any, Callable
5
5
  from boneio.const import CLOSE, COVER, IDLE, OPEN, OPENING, CLOSING, CLOSED, STOP
6
6
  from boneio.helper.events import EventBus
7
+ from boneio.helper.exceptions import CoverRelayException
7
8
  from boneio.helper.mqtt import BasicMqtt
8
9
  from boneio.helper.timeperiod import TimePeriod
9
10
  from boneio.relay import MCPRelay
@@ -44,7 +45,7 @@ class Cover(BasicMqtt):
44
45
  def __init__(
45
46
  self,
46
47
  id: str,
47
- open_relay: Any,
48
+ open_relay: MCPRelay,
48
49
  close_relay: MCPRelay,
49
50
  state_save: Callable,
50
51
  open_time: TimePeriod,
@@ -15,3 +15,7 @@ class I2CError(BoneIOException):
15
15
 
16
16
  class ConfigurationException(BoneIOException):
17
17
  """Configuration yaml exception."""
18
+
19
+
20
+ class CoverRelayException(BoneIOException):
21
+ """Cover configuration exception."""
boneio/manager.py CHANGED
@@ -171,6 +171,18 @@ class Manager:
171
171
  _id = _config[ID].replace(" ", "")
172
172
  open_relay = self._output.get(_config.get("open_relay"))
173
173
  close_relay = self._output.get(_config.get("close_relay"))
174
+ if not open_relay:
175
+ _LOGGER.error(
176
+ "Can't configure cover %s. This relay doesn't exist.",
177
+ _config.get("open_relay"),
178
+ )
179
+ continue
180
+ if not close_relay:
181
+ _LOGGER.error(
182
+ "Can't configure cover %s. This relay doesn't exist.",
183
+ _config.get("close_relay"),
184
+ )
185
+ continue
174
186
  if open_relay.output_type != NONE or close_relay.output_type != NONE:
175
187
  _LOGGER.error(
176
188
  "Can't configure cover %s. %s",
@@ -22,6 +22,8 @@ from boneio.helper import BasicMqtt
22
22
  from boneio.helper.ha_discovery import modbus_sensor_availabilty_message
23
23
  from boneio.helper.timeperiod import TimePeriod
24
24
  from boneio.helper.config import ConfigHelper
25
+ from boneio.modbus import Modbus
26
+
25
27
 
26
28
  _LOGGER = logging.getLogger(__name__)
27
29
 
@@ -92,7 +94,7 @@ class ModbusSensor(BasicMqtt):
92
94
 
93
95
  def __init__(
94
96
  self,
95
- modbus,
97
+ modbus: Modbus,
96
98
  address: str,
97
99
  model: str,
98
100
  config_helper: ConfigHelper,
@@ -104,7 +106,7 @@ class ModbusSensor(BasicMqtt):
104
106
  super().__init__(
105
107
  id=id or address,
106
108
  topic_type=SENSOR,
107
- topic_prefix=self._config_helper.topic_prefix,
109
+ topic_prefix=config_helper.topic_prefix,
108
110
  **kwargs,
109
111
  )
110
112
  self._config_helper = config_helper
boneio/version.py CHANGED
@@ -1,2 +1,2 @@
1
1
  # flake8: noqa
2
- __version__ = "0.3.0.dev4"
2
+ __version__ = "0.3.0.dev5"
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boneio
3
- Version: 0.3.0.dev4
3
+ Version: 0.3.0.dev5
4
4
  Summary: Python App for BoneIO
5
5
  Home-page: https://github.com/boneIO-eu/app_bbb
6
- Download-URL: https://github.com/boneIO-eu/app_bbb/archive/0.3.0.dev4.zip
6
+ Download-URL: https://github.com/boneIO-eu/app_bbb/archive/0.3.0.dev5.zip
7
7
  License: GNU General Public License v3.0
8
8
  Platform: UNKNOWN
9
9
  Classifier: Programming Language :: Python
@@ -1,13 +1,13 @@
1
1
  boneio/__init__.py,sha256=hoLKnu6h1uEsiCHA9Ql2MMDC7VQS0E-s_2cxBS-CTOg,147
2
2
  boneio/bonecli.py,sha256=Alvpbf3gZteV3IMX7DBUD6F_XV_-juKfZ1d4YpIM7PI,3093
3
3
  boneio/const.py,sha256=eBU9YNvTHvTRLvQtug0uqmsMZnVVNNcsKMZSow67fLM,2600
4
- boneio/cover.py,sha256=wKrnhaRGjJmEutUbisvDmPjVAYeDi4lYzV_de4nXxtA,8298
5
- boneio/manager.py,sha256=qfaND0Cw3qSAfBxV7eP1Gz41dQL9hps-9MRWWsbYeUg,14581
4
+ boneio/cover.py,sha256=2x6VxhtWz4lwfmGhOSbLiSlledT1ftRWh1uf0ibh5PU,8360
5
+ boneio/manager.py,sha256=PiBt9gD33GucouoXlQhtJf1mUSXptgqWcA-eMvfKtrs,15037
6
6
  boneio/modbus.py,sha256=QWUAYHXLcP7A_vVKTMbZ7x8KS72qLw65t_UzTDI3448,4003
7
7
  boneio/mqtt_client.py,sha256=Y_Vt0pKEETIy1XKQ-WFhowlRJhuv9tWLtyoD8Vdz7hk,6983
8
8
  boneio/oled.py,sha256=Be9QeTHX1mmCQOshYY1KNGvqt4nzEtJCD3gCE3gRSsc,4836
9
9
  boneio/runner.py,sha256=Y3Xx4N4WZchVr7a9gUtqskp_l5-_Cp7T_dVLfHSz8vQ,2064
10
- boneio/version.py,sha256=aRsCpG8-QTx0XdbEXY9OSFnuyhz5H629k_Tk-UN_tSk,42
10
+ boneio/version.py,sha256=K6yOWXyEwlGlL5ZtrxZGFDp5Bc2xM0LgF8WpnkXVQI0,42
11
11
  boneio/example_config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  boneio/example_config/adc.yaml,sha256=KaNfPuZmrhpiKJVUKC6uQXQ0YRCp0DoXVxYtqsbiSGI,168
13
13
  boneio/example_config/config.yaml,sha256=_gNf0Yo6p10Ao_rcSmHA_gCGMtDsvAdso3jNt3r3gqE,322
@@ -19,7 +19,7 @@ boneio/fonts/danube__.ttf,sha256=KBRPUcGvmroCjrWC8zK4MulUb9lV8R0lXkOY7lNnQWc,193
19
19
  boneio/helper/__init__.py,sha256=wOr2NWtGamuaWVmmQQP4vcNaj1I6pXeT2rDf-FzXKYk,2289
20
20
  boneio/helper/config.py,sha256=WuHsEP7FazMuCB55Qgc6m-X2gMsSoscmXTS8BoX8vPE,881
21
21
  boneio/helper/events.py,sha256=oKXDpFXSmbfhnucSYTTCPlhaBBstcAYYg3bTIVS6D1w,5251
22
- boneio/helper/exceptions.py,sha256=4APZ9UrJtCWP-5hLqHUThJ9fLKOZr-LoulLy_1QAq-I,318
22
+ boneio/helper/exceptions.py,sha256=u2W3P2KMajDfSzkwffxXlksRhmNVMMRFDg_pbR1kjf8,405
23
23
  boneio/helper/gpio.py,sha256=HOImpow_6rVOtgZ5FAZd-En61jNyigp2AVZMXYW0x3U,2765
24
24
  boneio/helper/ha_discovery.py,sha256=0Ab5xwplKoxArYTSwt5xyBtn5MaVbKlzdoRNw3tpRN8,5480
25
25
  boneio/helper/loader.py,sha256=lSkjp1o27dUCC5iSH8ymjcQCCBcMIRxguDMggYFs_94,9985
@@ -44,14 +44,14 @@ boneio/schema/schema.yaml,sha256=pJHGIC92SlTLhCUqBUolIQOqsoIcevfgXRJhfPu9lpo,945
44
44
  boneio/sensor/__init__.py,sha256=XJG-ktDfEPMs5RLt9hYT3gQmYhU_wMOR0Ud88-Q0KmM,305
45
45
  boneio/sensor/adc.py,sha256=mAxzgs0Eul1V6Fmye9V7TsJiPRnc59TQ-s7nb_PV7G8,1245
46
46
  boneio/sensor/gpio.py,sha256=9f_hNcCYvrEb7FvA00Xm-L5-fUXdH4SM-jZiOamOz2Q,1230
47
- boneio/sensor/modbus/__init__.py,sha256=O3Fvo_VtQhmZg7ZxSqahQTLhIA6Lt-rr09rkpwad_eM,8394
47
+ boneio/sensor/modbus/__init__.py,sha256=Pk1xrgRl126-9WkIXMair6H9HZWpD9_WoKfgFKVrA8M,8430
48
48
  boneio/sensor/modbus/sdm120.json,sha256=4sueFfSw7G6a77gdIUhbfJvE-MNVJFOeVbRvHDw5Rvk,4145
49
49
  boneio/sensor/modbus/sdm630.json,sha256=6LbIfXWk_PVRW-OuJwrsFEnRGLVEmEqqGIbj-1FDaiI,10969
50
50
  boneio/sensor/modbus/sofar.json,sha256=A_YztQN_ctyItIm2LH1tfcs-pSyG18I530qleLd2tOw,5592
51
51
  boneio/sensor/temp/__init__.py,sha256=lhvQqD76atQNyoxdeyskH8_fVOLCaHFoVnpzby6kqeE,1416
52
- boneio-0.3.0.dev4.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
53
- boneio-0.3.0.dev4.dist-info/METADATA,sha256=OZIapR0ZqXnK00bit9n4JHlfL3D7lEXNuavp5XYPiOU,1887
54
- boneio-0.3.0.dev4.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
55
- boneio-0.3.0.dev4.dist-info/entry_points.txt,sha256=JX7gluDIkQ6MBlzzxGHMItnBjciiJ73tsXwYcazMW_U,47
56
- boneio-0.3.0.dev4.dist-info/top_level.txt,sha256=ag9S5n1_KXZfyk9tN8R0YUDYbdA--e5a2w2FOD_yMdg,7
57
- boneio-0.3.0.dev4.dist-info/RECORD,,
52
+ boneio-0.3.0.dev5.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
53
+ boneio-0.3.0.dev5.dist-info/METADATA,sha256=PGcecTeL3p9UHnz_rAFSbUSu-U9Ke1TZHp1yWDh7pwo,1887
54
+ boneio-0.3.0.dev5.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
55
+ boneio-0.3.0.dev5.dist-info/entry_points.txt,sha256=JX7gluDIkQ6MBlzzxGHMItnBjciiJ73tsXwYcazMW_U,47
56
+ boneio-0.3.0.dev5.dist-info/top_level.txt,sha256=ag9S5n1_KXZfyk9tN8R0YUDYbdA--e5a2w2FOD_yMdg,7
57
+ boneio-0.3.0.dev5.dist-info/RECORD,,