Compare commits

...

2 Commits

Author SHA1 Message Date
andvikt
e75f8b91ef Update sensor.py 2021-03-24 12:40:39 +03:00
andvikt
bf15d4f3f9 Update hub.py 2021-03-24 10:57:42 +03:00
2 changed files with 4 additions and 3 deletions

View File

@@ -673,7 +673,7 @@ class MegaD:
cmd = dict(
pt=config[0][0],
chip=chip,
ws=''.join([hex(x).split('x')[1].ljust(2, '0').upper() for x in _next_val])
ws=''.join([hex(x).split('x')[1].rjust(2, '0').upper() for x in _next_val])
)
await self.request(**cmd)

View File

@@ -241,7 +241,8 @@ class Mega1WSensor(MegaPushEntity):
tmpl.hass = self.hass
ret = tmpl.async_render({'value': ret})
except:
return ret
pass
return ret
@property
def name(self):
@@ -255,4 +256,4 @@ class Mega1WSensor(MegaPushEntity):
_constructors = {
'sensor': Mega1WSensor,
'i2c': MegaI2C,
}
}