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:
parent
0a1d9abe79
commit
078ecef4b2
1 changed files with 2 additions and 2 deletions
|
@ -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."""
|
||||
|
|
Loading…
Add table
Reference in a new issue