Fixes in FHM switch & sensor
This commit is contained in:
@@ -66,7 +66,7 @@ class FhemSensor(Entity):
|
||||
_, new_value = line.split(':')
|
||||
self._state = int(float(new_value) / 255 * 100)
|
||||
await self.async_update_ha_state()
|
||||
elif self._type == 'power':
|
||||
elif self._type == 'power' and line.startswith('power'):
|
||||
self._available = True
|
||||
_, new_value = line
|
||||
self._state = int(new_value)
|
||||
|
||||
Reference in New Issue
Block a user