Bump package for Garage Amsterdam (#83167)
* Bump to new package version * Change the class name used in the new package * Fix failing test with using old package name
This commit is contained in:
parent
f0f4e4595c
commit
2602b45ec8
7 changed files with 13 additions and 13 deletions
|
@ -3,7 +3,7 @@ from datetime import timedelta
|
|||
import logging
|
||||
|
||||
import async_timeout
|
||||
from garages_amsterdam import GaragesAmsterdam
|
||||
from odp_amsterdam import ODPAmsterdam
|
||||
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import Platform
|
||||
|
@ -43,7 +43,7 @@ async def get_coordinator(
|
|||
async with async_timeout.timeout(10):
|
||||
return {
|
||||
garage.garage_name: garage
|
||||
for garage in await GaragesAmsterdam(
|
||||
for garage in await ODPAmsterdam(
|
||||
session=aiohttp_client.async_get_clientsession(hass)
|
||||
).all_garages()
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@ import logging
|
|||
from typing import Any
|
||||
|
||||
from aiohttp import ClientResponseError
|
||||
from garages_amsterdam import GaragesAmsterdam
|
||||
from odp_amsterdam import ODPAmsterdam
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
|
@ -30,7 +30,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||
if self._options is None:
|
||||
self._options = []
|
||||
try:
|
||||
api_data = await GaragesAmsterdam(
|
||||
api_data = await ODPAmsterdam(
|
||||
session=aiohttp_client.async_get_clientsession(self.hass)
|
||||
).all_garages()
|
||||
except ClientResponseError:
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"name": "Garages Amsterdam",
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/garages_amsterdam",
|
||||
"requirements": ["garages-amsterdam==3.0.0"],
|
||||
"requirements": ["odp-amsterdam==5.0.0"],
|
||||
"codeowners": ["@klaasnicolaas"],
|
||||
"iot_class": "cloud_polling"
|
||||
}
|
||||
|
|
|
@ -734,9 +734,6 @@ fritzconnection==1.10.3
|
|||
# homeassistant.components.google_translate
|
||||
gTTS==2.2.4
|
||||
|
||||
# homeassistant.components.garages_amsterdam
|
||||
garages-amsterdam==3.0.0
|
||||
|
||||
# homeassistant.components.google
|
||||
gcal-sync==4.0.4
|
||||
|
||||
|
@ -1215,6 +1212,9 @@ oauth2client==4.1.3
|
|||
# homeassistant.components.profiler
|
||||
objgraph==3.5.0
|
||||
|
||||
# homeassistant.components.garages_amsterdam
|
||||
odp-amsterdam==5.0.0
|
||||
|
||||
# homeassistant.components.oem
|
||||
oemthermostat==1.1.1
|
||||
|
||||
|
|
|
@ -550,9 +550,6 @@ fritzconnection==1.10.3
|
|||
# homeassistant.components.google_translate
|
||||
gTTS==2.2.4
|
||||
|
||||
# homeassistant.components.garages_amsterdam
|
||||
garages-amsterdam==3.0.0
|
||||
|
||||
# homeassistant.components.google
|
||||
gcal-sync==4.0.4
|
||||
|
||||
|
@ -887,6 +884,9 @@ oauth2client==4.1.3
|
|||
# homeassistant.components.profiler
|
||||
objgraph==3.5.0
|
||||
|
||||
# homeassistant.components.garages_amsterdam
|
||||
odp-amsterdam==5.0.0
|
||||
|
||||
# homeassistant.components.omnilogic
|
||||
omnilogic==0.4.5
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import pytest
|
|||
def mock_cases():
|
||||
"""Mock garages_amsterdam garages."""
|
||||
with patch(
|
||||
"garages_amsterdam.GaragesAmsterdam.all_garages",
|
||||
"odp_amsterdam.ODPAmsterdam.all_garages",
|
||||
return_value=[
|
||||
Mock(
|
||||
garage_name="IJDok",
|
||||
|
|
|
@ -53,7 +53,7 @@ async def test_error_handling(
|
|||
"""Test we get the form."""
|
||||
|
||||
with patch(
|
||||
"homeassistant.components.garages_amsterdam.config_flow.GaragesAmsterdam.all_garages",
|
||||
"homeassistant.components.garages_amsterdam.config_flow.ODPAmsterdam.all_garages",
|
||||
side_effect=side_effect,
|
||||
):
|
||||
result = await hass.config_entries.flow.async_init(
|
||||
|
|
Loading…
Add table
Reference in a new issue