Use pydeconz interface controls for button platform (#74654)

pull/74656/head
Robert Svensson 2022-07-07 20:13:03 +02:00 committed by GitHub
parent bd43f0393c
commit ac85a3ce64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -90,8 +90,11 @@ class DeconzButton(DeconzSceneMixin, ButtonEntity):
async def async_press(self) -> None:
"""Store light states into scene."""
async_button_fn = getattr(self._device, self.entity_description.button_fn)
await async_button_fn()
async_button_fn = getattr(
self.gateway.api.scenes,
self.entity_description.button_fn,
)
await async_button_fn(self._device.group_id, self._device.id)
def get_device_identifier(self) -> str:
"""Return a unique identifier for this scene."""