mirror of
https://github.com/andvikt/mega_hacs.git
synced 2025-12-12 01:24:29 +05:00
add new events, fix binsensor
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
_params = ['m', 'click', 'cnt', 'pt']
|
||||
|
||||
def make_ints(d: dict):
|
||||
for x in d:
|
||||
for x in _params:
|
||||
try:
|
||||
d[x] = float(d[x])
|
||||
d[x] = int(d.get(x, 0))
|
||||
except (ValueError, TypeError):
|
||||
pass
|
||||
if 'm' not in d:
|
||||
|
||||
Reference in New Issue
Block a user