diff --git a/homeassistant/components/ring/button.py b/homeassistant/components/ring/button.py index 343c0d68257..d739dc29841 100644 --- a/homeassistant/components/ring/button.py +++ b/homeassistant/components/ring/button.py @@ -52,6 +52,6 @@ class RingDoorButton(RingEntity, ButtonEntity): self._attr_unique_id = f"{device.id}-{description.key}" @exception_wrap - def press(self) -> None: + def press(self): """Open the door.""" self._device.open_door() diff --git a/homeassistant/components/ring/camera.py b/homeassistant/components/ring/camera.py index 7cbe3559ab2..ec0f4ca3fab 100644 --- a/homeassistant/components/ring/camera.py +++ b/homeassistant/components/ring/camera.py @@ -132,7 +132,7 @@ class RingCam(RingEntity, Camera): finally: await stream.close() - async def async_update(self) -> None: + async def async_update(self): """Update camera entity and refresh attributes.""" if ( self._device.has_capability(MOTION_DETECTION_CAPABILITY) @@ -160,7 +160,7 @@ class RingCam(RingEntity, Camera): self._expires_at = FORCE_REFRESH_INTERVAL + utcnow @exception_wrap - def _get_video(self) -> str: + def _get_video(self): return self._device.recording_url(self._last_event["id"]) @exception_wrap diff --git a/homeassistant/components/ring/light.py b/homeassistant/components/ring/light.py index 31e22c2084c..10d13e59810 100644 --- a/homeassistant/components/ring/light.py +++ b/homeassistant/components/ring/light.py @@ -4,7 +4,7 @@ from datetime import timedelta import logging from typing import Any -from ring_doorbell import RingGeneric, RingStickUpCam +from ring_doorbell import RingStickUpCam from homeassistant.components.light import ColorMode, LightEntity from homeassistant.config_entries import ConfigEntry @@ -55,7 +55,7 @@ class RingLight(RingEntity, LightEntity): _attr_supported_color_modes = {ColorMode.ONOFF} _attr_translation_key = "light" - def __init__(self, device: RingGeneric, coordinator) -> None: + def __init__(self, device, coordinator): """Initialize the light.""" super().__init__(device, coordinator) self._attr_unique_id = device.id diff --git a/homeassistant/components/ring/manifest.json b/homeassistant/components/ring/manifest.json index 05c6dcd5ab1..1abc9a99e63 100644 --- a/homeassistant/components/ring/manifest.json +++ b/homeassistant/components/ring/manifest.json @@ -14,5 +14,5 @@ "iot_class": "cloud_polling", "loggers": ["ring_doorbell"], "quality_scale": "silver", - "requirements": ["ring-doorbell[listen]==0.8.9"] + "requirements": ["ring-doorbell[listen]==0.8.10"] } diff --git a/homeassistant/components/ring/siren.py b/homeassistant/components/ring/siren.py index 4e53ab8a006..4b7d9243dbf 100644 --- a/homeassistant/components/ring/siren.py +++ b/homeassistant/components/ring/siren.py @@ -1,9 +1,7 @@ """Component providing HA Siren support for Ring Chimes.""" import logging -from typing import Any -from ring_doorbell import RingGeneric from ring_doorbell.const import CHIME_TEST_SOUND_KINDS, KIND_DING from homeassistant.components.siren import ATTR_TONE, SirenEntity, SirenEntityFeature @@ -37,18 +35,18 @@ async def async_setup_entry( class RingChimeSiren(RingEntity, SirenEntity): """Creates a siren to play the test chimes of a Chime device.""" - _attr_available_tones = CHIME_TEST_SOUND_KINDS + _attr_available_tones = list(CHIME_TEST_SOUND_KINDS) _attr_supported_features = SirenEntityFeature.TURN_ON | SirenEntityFeature.TONES _attr_translation_key = "siren" - def __init__(self, device: RingGeneric, coordinator: RingDataCoordinator) -> None: + def __init__(self, device, coordinator: RingDataCoordinator) -> None: """Initialize a Ring Chime siren.""" super().__init__(device, coordinator) # Entity class attributes self._attr_unique_id = f"{self._device.id}-siren" @exception_wrap - def turn_on(self, **kwargs: Any) -> None: + def turn_on(self, **kwargs): """Play the test sound on a Ring Chime device.""" tone = kwargs.get(ATTR_TONE) or KIND_DING diff --git a/homeassistant/components/ring/switch.py b/homeassistant/components/ring/switch.py index 15aa0a787bb..2221eeb7705 100644 --- a/homeassistant/components/ring/switch.py +++ b/homeassistant/components/ring/switch.py @@ -62,7 +62,7 @@ class SirenSwitch(BaseRingSwitch): _attr_translation_key = "siren" - def __init__(self, device: RingGeneric, coordinator: RingDataCoordinator) -> None: + def __init__(self, device, coordinator: RingDataCoordinator) -> None: """Initialize the switch for a device with a siren.""" super().__init__(device, coordinator, "siren") self._no_updates_until = dt_util.utcnow() diff --git a/requirements_all.txt b/requirements_all.txt index e248dcc6ca1..17988445501 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2451,7 +2451,7 @@ rfk101py==0.0.1 rflink==0.0.66 # homeassistant.components.ring -ring-doorbell[listen]==0.8.9 +ring-doorbell[listen]==0.8.10 # homeassistant.components.fleetgo ritassist==0.9.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 5ecac38fb93..a834f5849cd 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1894,7 +1894,7 @@ reolink-aio==0.8.9 rflink==0.0.66 # homeassistant.components.ring -ring-doorbell[listen]==0.8.9 +ring-doorbell[listen]==0.8.10 # homeassistant.components.roku rokuecp==0.19.2