boneIO 0.6.0dev5__py3-none-any.whl → 0.6.1dev2__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.
Potentially problematic release.
This version of boneIO might be problematic. Click here for more details.
- {boneIO-0.6.0.dev5.dist-info → boneIO-0.6.1.dev2.dist-info}/METADATA +1 -1
- {boneIO-0.6.0.dev5.dist-info → boneIO-0.6.1.dev2.dist-info}/RECORD +9 -9
- boneio/helper/config.py +2 -1
- boneio/sensor/modbus/__init__.py +2 -2
- boneio/sensor/temp/__init__.py +7 -3
- boneio/version.py +1 -1
- {boneIO-0.6.0.dev5.dist-info → boneIO-0.6.1.dev2.dist-info}/WHEEL +0 -0
- {boneIO-0.6.0.dev5.dist-info → boneIO-0.6.1.dev2.dist-info}/entry_points.txt +0 -0
- {boneIO-0.6.0.dev5.dist-info → boneIO-0.6.1.dev2.dist-info}/licenses/LICENSE +0 -0
|
@@ -14,7 +14,7 @@ boneio/fonts/danube__.ttf,sha256=KBRPUcGvmroCjrWC8zK4MulUb9lV8R0lXkOY7lNnQWc,193
|
|
|
14
14
|
boneio/helper/__init__.py,sha256=r-9dubCtDlrs_HFF2OGPQEPmw1XREgb4qQF6I486Li4,2039
|
|
15
15
|
boneio/helper/async_updater.py,sha256=BVh5mXFxgaZqoekjQbQSCTssfyVIdCQ80LCJny-rOo4,985
|
|
16
16
|
boneio/helper/click_timer.py,sha256=blWofzFIwuYcF_yFfCGDtI8nGSMpSdXdl9qMLXlKdXc,1169
|
|
17
|
-
boneio/helper/config.py,sha256=
|
|
17
|
+
boneio/helper/config.py,sha256=tOYbr6Axf-91eHyCgRNuIkSC7nrAFO0XVqImajpPpZI,2277
|
|
18
18
|
boneio/helper/events.py,sha256=EHYJy507RF1LikWQ2s4r990JRvR9rO4z7FkaJqt1Mrk,7494
|
|
19
19
|
boneio/helper/exceptions.py,sha256=vyYSUojwB7OttOPUjbxeHFM7C_o5ZQmRUcZ_vYpxYYI,717
|
|
20
20
|
boneio/helper/filter.py,sha256=UcjifjaC5wHDW2He7wmwCX2IjSSeLVhXyhrXHeT8RmA,885
|
|
@@ -58,20 +58,20 @@ boneio/schema/update_interval.yaml,sha256=L_YLddAZdybcdO-T57Qhlv1GaWIVDwhvH-GadD
|
|
|
58
58
|
boneio/sensor/__init__.py,sha256=VjFBEQQv_U0T2ENkzefuBdzmqNvBTEv4M-gQKScc8o0,431
|
|
59
59
|
boneio/sensor/adc.py,sha256=Yf5F8JcZJt0K4ijpPqI8do0BqDfLvfja_LE8_Zu3u7U,1281
|
|
60
60
|
boneio/sensor/gpio.py,sha256=oAUYHGLX0_JK6AJMplmDBnLBIAZ2GaDJ7ts8AceljvQ,1303
|
|
61
|
-
boneio/sensor/modbus/__init__.py,sha256=
|
|
61
|
+
boneio/sensor/modbus/__init__.py,sha256=IUwGdGn_egqOcSZrt4tTu0n8APnc0M7uau7XUWDlhes,8520
|
|
62
62
|
boneio/sensor/modbus/dts1964_3f.json,sha256=WABph_2X4OgMidSM28vw4dLd9ZByRoiUP-RqE0UMpR8,8810
|
|
63
63
|
boneio/sensor/modbus/pt100.json,sha256=bzKNYDc3lMto94Ut8gutVIsHytQiMobwFCkonOiMegs,526
|
|
64
64
|
boneio/sensor/modbus/r4dcb08.json,sha256=oj4eK3bD1bG8BTRE4STVHB5L92luWaJ3FYFHQvFg-ZA,2735
|
|
65
65
|
boneio/sensor/modbus/sdm120.json,sha256=4sueFfSw7G6a77gdIUhbfJvE-MNVJFOeVbRvHDw5Rvk,4145
|
|
66
66
|
boneio/sensor/modbus/sdm630.json,sha256=6LbIfXWk_PVRW-OuJwrsFEnRGLVEmEqqGIbj-1FDaiI,10969
|
|
67
67
|
boneio/sensor/modbus/sofar.json,sha256=A_YztQN_ctyItIm2LH1tfcs-pSyG18I530qleLd2tOw,5592
|
|
68
|
-
boneio/sensor/temp/__init__.py,sha256=
|
|
68
|
+
boneio/sensor/temp/__init__.py,sha256=OViqBb7DwVn_aFIy6V0iqkSUDjsDNLQ5sOS_4frYdwg,1808
|
|
69
69
|
boneio/sensor/temp/dallas.py,sha256=xrvd1LNBh1fRcjz_yd_9S29Lv26ItVtLCmhZgVQWJos,2485
|
|
70
70
|
boneio/sensor/temp/lm75.py,sha256=-mpOv78429plRPBp9s09Ljz1x2Bdxuagalqz40vlAKE,243
|
|
71
71
|
boneio/sensor/temp/mcp9808.py,sha256=yAh5yJzZLGTqa39xV4fyqsruj7oy3niOZAUV2W6eyCM,271
|
|
72
|
-
boneio/version.py,sha256=
|
|
73
|
-
boneIO-0.6.
|
|
74
|
-
boneIO-0.6.
|
|
75
|
-
boneIO-0.6.
|
|
76
|
-
boneIO-0.6.
|
|
77
|
-
boneIO-0.6.
|
|
72
|
+
boneio/version.py,sha256=m3ydJhgfj3HkpDmGgH9_bPZTvw0tiXIw8U3oYOjNlRg,41
|
|
73
|
+
boneIO-0.6.1.dev2.dist-info/entry_points.txt,sha256=Igl1SMDEWwMg144bwRz28UOCb80hdxomC99QJ3u6qC0,46
|
|
74
|
+
boneIO-0.6.1.dev2.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
|
|
75
|
+
boneIO-0.6.1.dev2.dist-info/METADATA,sha256=oUsaBxizn26BttbzpHQn9PznPpKpgRr6dw-xCObtntY,1698
|
|
76
|
+
boneIO-0.6.1.dev2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
77
|
+
boneIO-0.6.1.dev2.dist-info/RECORD,,
|
boneio/helper/config.py
CHANGED
|
@@ -3,6 +3,7 @@ Module to provide basic config options.
|
|
|
3
3
|
"""
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
from _collections_abc import dict_values
|
|
6
|
+
from typing import Union
|
|
6
7
|
from boneio.const import BONEIO, HOMEASSISTANT, LIGHT, SENSOR, COVER, BUTTON, SWITCH, BINARY_SENSOR
|
|
7
8
|
|
|
8
9
|
|
|
@@ -47,7 +48,7 @@ class ConfigHelper:
|
|
|
47
48
|
def subscribe_topic(self) -> str:
|
|
48
49
|
return f"{self.cmd_topic_prefix}+/+/#"
|
|
49
50
|
|
|
50
|
-
def add_autodiscovery_msg(self, ha_type: str, topic: str, payload: str):
|
|
51
|
+
def add_autodiscovery_msg(self, ha_type: str, topic: str, payload: Union[str, dict, None]):
|
|
51
52
|
"""Add autodiscovery message."""
|
|
52
53
|
self._autodiscovery_messages[ha_type][topic] = {"topic": topic, "payload": payload}
|
|
53
54
|
|
boneio/sensor/modbus/__init__.py
CHANGED
|
@@ -138,10 +138,10 @@ class ModbusSensor(BasicMqtt, AsyncUpdater):
|
|
|
138
138
|
sensor_id=sensor_id,
|
|
139
139
|
**kwargs,
|
|
140
140
|
)
|
|
141
|
-
self._config_helper.add_autodiscovery_msg(topic=topic, payload=payload)
|
|
141
|
+
self._config_helper.add_autodiscovery_msg(topic=topic, payload=payload, ha_type=SENSOR)
|
|
142
142
|
self._send_message(topic=topic, payload=payload)
|
|
143
143
|
|
|
144
|
-
def _send_discovery_for_all_registers(self, register: int = 0) ->
|
|
144
|
+
def _send_discovery_for_all_registers(self, register: int = 0) -> datetime:
|
|
145
145
|
"""Send discovery message to HA for each register."""
|
|
146
146
|
for data in self._db[REGISTERS_BASE]:
|
|
147
147
|
for register in data[REGISTERS]:
|
boneio/sensor/temp/__init__.py
CHANGED
|
@@ -44,9 +44,13 @@ class TempSensor(BasicMqtt, AsyncUpdater, Filter):
|
|
|
44
44
|
|
|
45
45
|
def update(self, time: datetime) -> None:
|
|
46
46
|
"""Fetch temperature periodically and send to MQTT."""
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
try:
|
|
48
|
+
_temp = self._pct.temperature
|
|
49
|
+
_LOGGER.debug("Fetched temperature %s. Applying filters.", _temp)
|
|
50
|
+
_temp = self._apply_filters(value=self._pct.temperature)
|
|
51
|
+
except RuntimeError as err:
|
|
52
|
+
_temp = None
|
|
53
|
+
_LOGGER.error("Sensor error: %s %s", err, self.id)
|
|
50
54
|
if _temp is None:
|
|
51
55
|
return
|
|
52
56
|
self._state = _temp
|
boneio/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# flake8: noqa
|
|
2
|
-
__version__ = "0.6.
|
|
2
|
+
__version__ = "0.6.1dev2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|