Refactor Ring data handling (#30777)
* Refactor Ring data handling * Add async_ to methods
This commit is contained in:
1 parent
de26108b23
commit
1e82813c3b
9 files changed
+514
-482
No files matched your search
@@ -1,4 +1,5 @@
|
||||
"""The tests for the Ring binary sensor platform."""
|
||||
from time import time
|
||||
from unittest.mock import patch
|
||||
|
||||
from .common import setup_platform
|
||||
@@ -8,7 +9,15 @@ async def test_binary_sensor(hass, requests_mock):
|
||||
"""Test the Ring binary sensors."""
|
||||
with patch(
|
||||
"ring_doorbell.Ring.active_alerts",
|
||||
return_value=[{"kind": "motion", "doorbot_id": 987654}],
|
||||
return_value=[
|
||||
{
|
||||
"kind": "motion",
|
||||
"doorbot_id": 987654,
|
||||
"state": "ringing",
|
||||
"now": time(),
|
||||
"expires_in": 180,
|
||||
}
|
||||
],
|
||||
):
|
||||
await setup_platform(hass, "binary_sensor")
|
||||
|
||||
|
||||
Reference in new issue
Block a user