mirror of
https://github.com/home-assistant/core.git
synced 2025-07-09 22:37:11 +00:00
Fix Arlo doing I/O in event loop (#32190)
This commit is contained in:
parent
1f23361a5d
commit
fc0278c91f
@ -110,19 +110,19 @@ class ArloBaseStation(AlarmControlPanel):
|
||||
else:
|
||||
self._state = None
|
||||
|
||||
async def async_alarm_disarm(self, code=None):
|
||||
def alarm_disarm(self, code=None):
|
||||
"""Send disarm command."""
|
||||
self._base_station.mode = DISARMED
|
||||
|
||||
async def async_alarm_arm_away(self, code=None):
|
||||
def alarm_arm_away(self, code=None):
|
||||
"""Send arm away command. Uses custom mode."""
|
||||
self._base_station.mode = self._away_mode_name
|
||||
|
||||
async def async_alarm_arm_home(self, code=None):
|
||||
def alarm_arm_home(self, code=None):
|
||||
"""Send arm home command. Uses custom mode."""
|
||||
self._base_station.mode = self._home_mode_name
|
||||
|
||||
async def async_alarm_arm_night(self, code=None):
|
||||
def alarm_arm_night(self, code=None):
|
||||
"""Send arm night command. Uses custom mode."""
|
||||
self._base_station.mode = self._night_mode_name
|
||||
|
||||
|
@ -78,8 +78,10 @@ class ArloCam(Camera):
|
||||
|
||||
async def handle_async_mjpeg_stream(self, request):
|
||||
"""Generate an HTTP MJPEG stream from the camera."""
|
||||
video = await self.hass.async_add_executor_job(
|
||||
getattr, self._camera, "last_video"
|
||||
)
|
||||
|
||||
video = self._camera.last_video
|
||||
if not video:
|
||||
error_msg = (
|
||||
f"Video not found for {self.name}. "
|
||||
|
Loading…
x
Reference in New Issue
Block a user