mirror of
https://github.com/home-assistant/core.git
synced 2026-04-29 02:13:44 +02:00
Use only_cache parameter in binary_sensor.zha.Remote (#16711)
This commit is contained in:
committed by
Paulus Schoutsen
parent
68472b8241
commit
59ec469722
@@ -253,5 +253,9 @@ class Remote(zha.Entity, BinarySensorDevice):
|
||||
"""Retrieve latest state."""
|
||||
from zigpy.zcl.clusters.general import OnOff
|
||||
result = await zha.safe_read(
|
||||
self._endpoint.out_clusters[OnOff.cluster_id], ['on_off'])
|
||||
self._endpoint.out_clusters[OnOff.cluster_id],
|
||||
['on_off'],
|
||||
allow_cache=False,
|
||||
only_cache=(not self._initialized)
|
||||
)
|
||||
self._state = result.get('on_off', self._state)
|
||||
|
||||
Reference in New Issue
Block a user