Compare commits

..

4 Commits

Author SHA1 Message Date
Викторов Андрей Германович
40ae6041ae Bump version: 1.1.8b11 → 1.1.8b12 2023-10-17 10:14:37 +03:00
Викторов Андрей Германович
8383c73d0e fix sensors 2023-10-17 10:14:34 +03:00
Викторов Андрей Германович
9d5ea9697d Bump version: 1.1.8b10 → 1.1.8b11 2023-10-17 10:03:52 +03:00
Викторов Андрей Германович
3e5435059d fix sensors 2023-10-16 11:00:01 +03:00
3 changed files with 9 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
[bumpversion]
current_version = 1.1.8b10
current_version = 1.1.8b12
parse = (?P<major>\d+)(\.(?P<minor>\d+))(\.(?P<patch>\d+))(?P<release>[bf]*)(?P<build>\d*)
commit = True
tag = True

View File

@@ -489,6 +489,7 @@ class MegaD:
:param params: параметры url
:return:
"""
params = params.copy()
pt = params.get("pt")
i2c_dev = params.get("i2c_dev", None)
@@ -519,11 +520,14 @@ class MegaD:
elif idx is not None and idx > 0:
v: str = self.values.get(f"chache_{pt}")
if idx is not None:
v = safe_float(v.split("/")[idx])
ret = {_params: v}
vv = v.split("/")
if len(vv) == 3:
v = vv[idx]
else:
v: None
ret = {_params: safe_float(v)}
except Exception:
self.lg.exception(f"while getting i2c {params=}")
except asyncio.TimeoutError:
return
self.lg.debug("i2c response: %s", ret)
if delay:

View File

@@ -15,5 +15,5 @@
"@andvikt"
],
"issue_tracker": "https://github.com/andvikt/mega_hacs/issues",
"version": "v1.1.8b10"
"version": "v1.1.8b12"
}