Use only_cache parameter in binary_sensor.zha.Remote (#16711)
This commit is contained in:
parent
68472b8241
commit
59ec469722
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue