From 0b47bf1f0b9bf93c9c576f0868da112e1ed184aa Mon Sep 17 00:00:00 2001 From: starkillerOG Date: Tue, 3 Jan 2023 02:49:55 +0100 Subject: [PATCH] Switch to reolink-aio (#85014) * switch to reolink-aio * fix imports --- CODEOWNERS | 4 ++-- homeassistant/components/reolink/__init__.py | 2 +- homeassistant/components/reolink/config_flow.py | 2 +- homeassistant/components/reolink/host.py | 4 ++-- homeassistant/components/reolink/manifest.json | 6 +++--- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- tests/components/reolink/test_config_flow.py | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CODEOWNERS b/CODEOWNERS index a62841ae884..464bb252a2e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -947,8 +947,8 @@ build.json @home-assistant/supervisor /tests/components/remote/ @home-assistant/core /homeassistant/components/renault/ @epenet /tests/components/renault/ @epenet -/homeassistant/components/reolink/ @starkillerOG @JimStar -/tests/components/reolink/ @starkillerOG @JimStar +/homeassistant/components/reolink/ @starkillerOG +/tests/components/reolink/ @starkillerOG /homeassistant/components/repairs/ @home-assistant/core /tests/components/repairs/ @home-assistant/core /homeassistant/components/repetier/ @MTrab @ShadowBr0ther diff --git a/homeassistant/components/reolink/__init__.py b/homeassistant/components/reolink/__init__.py index db61e4aa627..a4daba45ba7 100644 --- a/homeassistant/components/reolink/__init__.py +++ b/homeassistant/components/reolink/__init__.py @@ -9,7 +9,7 @@ import logging from aiohttp import ClientConnectorError import async_timeout -from reolink_ip.exceptions import ApiError, InvalidContentTypeError +from reolink_aio.exceptions import ApiError, InvalidContentTypeError from homeassistant.config_entries import ConfigEntry from homeassistant.const import EVENT_HOMEASSISTANT_STOP, Platform diff --git a/homeassistant/components/reolink/config_flow.py b/homeassistant/components/reolink/config_flow.py index c351a125056..31f1a10dc1e 100644 --- a/homeassistant/components/reolink/config_flow.py +++ b/homeassistant/components/reolink/config_flow.py @@ -4,7 +4,7 @@ from __future__ import annotations import logging from typing import Any -from reolink_ip.exceptions import ApiError, CredentialsInvalidError +from reolink_aio.exceptions import ApiError, CredentialsInvalidError import voluptuous as vol from homeassistant import config_entries, core, exceptions diff --git a/homeassistant/components/reolink/host.py b/homeassistant/components/reolink/host.py index 0a5e378a78d..fc5e4947afa 100644 --- a/homeassistant/components/reolink/host.py +++ b/homeassistant/components/reolink/host.py @@ -7,8 +7,8 @@ import logging from typing import Any import aiohttp -from reolink_ip.api import Host -from reolink_ip.exceptions import ( +from reolink_aio.api import Host +from reolink_aio.exceptions import ( ApiError, CredentialsInvalidError, InvalidContentTypeError, diff --git a/homeassistant/components/reolink/manifest.json b/homeassistant/components/reolink/manifest.json index b5483be23ab..2c0deafca45 100644 --- a/homeassistant/components/reolink/manifest.json +++ b/homeassistant/components/reolink/manifest.json @@ -3,8 +3,8 @@ "name": "Reolink IP NVR/camera", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/reolink", - "requirements": ["reolink-ip==0.0.40"], - "codeowners": ["@starkillerOG", "@JimStar"], + "requirements": ["reolink-aio==0.1.1"], + "codeowners": ["@starkillerOG"], "iot_class": "local_polling", - "loggers": ["reolink-ip"] + "loggers": ["reolink-aio"] } diff --git a/requirements_all.txt b/requirements_all.txt index 6ba0e543405..57d98a60296 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2190,7 +2190,7 @@ regenmaschine==2022.11.0 renault-api==0.1.11 # homeassistant.components.reolink -reolink-ip==0.0.40 +reolink-aio==0.1.1 # homeassistant.components.python_script restrictedpython==5.2 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index c7d0cbe8697..8cfec7c52ed 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1529,7 +1529,7 @@ regenmaschine==2022.11.0 renault-api==0.1.11 # homeassistant.components.reolink -reolink-ip==0.0.40 +reolink-aio==0.1.1 # homeassistant.components.python_script restrictedpython==5.2 diff --git a/tests/components/reolink/test_config_flow.py b/tests/components/reolink/test_config_flow.py index ad017186075..b69fab9797f 100644 --- a/tests/components/reolink/test_config_flow.py +++ b/tests/components/reolink/test_config_flow.py @@ -3,7 +3,7 @@ import json from unittest.mock import AsyncMock, Mock, patch import pytest -from reolink_ip.exceptions import ApiError, CredentialsInvalidError +from reolink_aio.exceptions import ApiError, CredentialsInvalidError from homeassistant import config_entries, data_entry_flow from homeassistant.components.reolink import const