Skip to content

Commit

Permalink
🔧 improve for camera
Browse files Browse the repository at this point in the history
  • Loading branch information
al-one committed Jan 4, 2024
1 parent 286e8bb commit 4cadde5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions custom_components/xiaomi_miot/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,6 @@ async def async_update(self):
await super().async_update()
if not self._available:
return
if self._prop_power:
self._update_sub_entities(self._prop_power, None, 'switch')

self._motion_enable = self.custom_config_bool('use_motion_stream', self._use_motion_stream)
add_cameras = self._add_entities.get(ENTITY_DOMAIN)
Expand All @@ -244,7 +242,7 @@ async def async_update(self):
add_cameras([self._motion_entity], update_before_add=True)

adt = None
lag = locale.getdefaultlocale()[0]
lag = locale.getlocale()[0]
stm = int(time.time() - 86400 * 7) * 1000
etm = int(time.time() * 1000 + 999)
if not self._motion_enable and not self._motion_entity:
Expand Down

0 comments on commit 4cadde5

Please sign in to comment.