From 8840c227d253ed4f1880851bc63dd773be844b87 Mon Sep 17 00:00:00 2001 From: Sergio Viudes Date: Sun, 18 Feb 2018 06:12:11 +0100 Subject: [PATCH] Added doorbird_last_motion to DoorBird camera platform (#12457) --- homeassistant/components/camera/doorbird.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/camera/doorbird.py b/homeassistant/components/camera/doorbird.py index 2ca962a8450..034ddc2fabb 100644 --- a/homeassistant/components/camera/doorbird.py +++ b/homeassistant/components/camera/doorbird.py @@ -18,8 +18,10 @@ from homeassistant.helpers.aiohttp_client import async_get_clientsession DEPENDENCIES = ['doorbird'] _CAMERA_LAST_VISITOR = "DoorBird Last Ring" +_CAMERA_LAST_MOTION = "DoorBird Last Motion" _CAMERA_LIVE = "DoorBird Live" _LAST_VISITOR_INTERVAL = datetime.timedelta(minutes=1) +_LAST_MOTION_INTERVAL = datetime.timedelta(minutes=1) _LIVE_INTERVAL = datetime.timedelta(seconds=1) _LOGGER = logging.getLogger(__name__) _TIMEOUT = 10 # seconds @@ -34,6 +36,9 @@ def async_setup_platform(hass, config, async_add_devices, discovery_info=None): DoorBirdCamera( device.history_image_url(1, 'doorbell'), _CAMERA_LAST_VISITOR, _LAST_VISITOR_INTERVAL), + DoorBirdCamera( + device.history_image_url(1, 'motionsensor'), _CAMERA_LAST_MOTION, + _LAST_MOTION_INTERVAL), ])