From 078ecef4b224baa64057b00192aaf7837462d40f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ab=C3=ADlio=20Costa?= Date: Fri, 9 Oct 2020 14:23:52 +0100 Subject: [PATCH] Remove duplicated attribute request from ZHA (#41442) The on_off attribute is on the REPORT_CONFIG, so super().async_initialize already requests it from the device. No need to request it twice. --- homeassistant/components/zha/core/channels/general.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/zha/core/channels/general.py b/homeassistant/components/zha/core/channels/general.py index 05406b6939e..61d78097b47 100644 --- a/homeassistant/components/zha/core/channels/general.py +++ b/homeassistant/components/zha/core/channels/general.py @@ -294,10 +294,10 @@ class OnOffChannel(ZigbeeChannel): async def async_initialize(self, from_cache): """Initialize channel.""" - state = await self.get_attribute_value(self.ON_OFF, from_cache=from_cache) + await super().async_initialize(from_cache) + state = await self.get_attribute_value(self.ON_OFF, from_cache=True) if state is not None: self._state = bool(state) - await super().async_initialize(from_cache) async def async_update(self): """Initialize channel."""