mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Make sure Ring binary_sensor state will update only if device_id matches (#9247)
This commit is contained in:
parent
0af4f8903d
commit
a55895b662
@ -103,7 +103,8 @@ class RingBinarySensor(BinarySensorDevice):
|
||||
self._data.check_alerts()
|
||||
|
||||
if self._data.alert:
|
||||
self._state = (self._sensor_type ==
|
||||
self._data.alert.get('kind'))
|
||||
if self._sensor_type == self._data.alert.get('kind') and \
|
||||
self._data.account_id == self._data.alert.get('doorbot_id'):
|
||||
self._state = True
|
||||
else:
|
||||
self._state = False
|
||||
|
2
tests/fixtures/ring_ding_active.json
vendored
2
tests/fixtures/ring_ding_active.json
vendored
@ -2,7 +2,7 @@
|
||||
"audio_jitter_buffer_ms": 0,
|
||||
"device_kind": "lpd_v1",
|
||||
"doorbot_description": "Front Door",
|
||||
"doorbot_id": 12345,
|
||||
"doorbot_id": 987652,
|
||||
"expires_in": 180,
|
||||
"id": 123456789,
|
||||
"id_str": "123456789",
|
||||
|
Loading…
x
Reference in New Issue
Block a user