From 59ec469722e784a90f03732c0a37f65aca2e9dbf Mon Sep 17 00:00:00 2001 From: damarco Date: Mon, 8 Oct 2018 20:23:26 +0200 Subject: [PATCH] Use only_cache parameter in binary_sensor.zha.Remote (#16711) --- homeassistant/components/binary_sensor/zha.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/binary_sensor/zha.py b/homeassistant/components/binary_sensor/zha.py index aa07a673c973..fa24ed899808 100644 --- a/homeassistant/components/binary_sensor/zha.py +++ b/homeassistant/components/binary_sensor/zha.py @@ -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)