Adapt Axis integration to async HTTPx calls (#42095)
This commit is contained in:
1 parent
fcdb54d878
commit
1303d20064
9 files changed
+41
-40
No files matched your search
@@ -37,15 +37,11 @@ class AxisSwitch(AxisEventBase, SwitchEntity):
|
||||
|
||||
async def async_turn_on(self, **kwargs):
|
||||
"""Turn on switch."""
|
||||
await self.hass.async_add_executor_job(
|
||||
self.device.api.vapix.ports[self.event.id].close
|
||||
)
|
||||
await self.device.api.vapix.ports[self.event.id].close()
|
||||
|
||||
async def async_turn_off(self, **kwargs):
|
||||
"""Turn off switch."""
|
||||
await self.hass.async_add_executor_job(
|
||||
self.device.api.vapix.ports[self.event.id].open
|
||||
)
|
||||
await self.device.api.vapix.ports[self.event.id].open()
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
|
||||
Reference in new issue
Block a user