Bump aiounifi to v35 (#79040)

* Update imports
Replace constants with enums

* Import new request objects

* Bump aiounifi to v35
This commit is contained in:
Robert Svensson 2022-09-25 20:08:56 +02:00 committed by GitHub
parent 42bd664305
commit bfd12730f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 98 additions and 84 deletions

View file

@ -4,6 +4,8 @@ from __future__ import annotations
import logging
from typing import Any
from aiounifi.models.device import DeviceUpgradeRequest
from homeassistant.components.update import (
DOMAIN,
UpdateDeviceClass,
@ -136,4 +138,4 @@ class UniFiDeviceUpdateEntity(UniFiBase, UpdateEntity):
self, version: str | None, backup: bool, **kwargs: Any
) -> None:
"""Install an update."""
await self.controller.api.devices.upgrade(self.device.mac)
await self.controller.api.request(DeviceUpgradeRequest.create(self.device.mac))