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.
This commit is contained in:
Abílio Costa 2020-10-09 14:23:52 +01:00 committed by GitHub
parent 0a1d9abe79
commit 078ecef4b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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."""