mirror of
https://github.com/home-assistant/core.git
synced 2025-07-26 22:57:17 +00:00
Bump Weheat to 2025.1.15 (#135626)
This commit is contained in:
parent
24bb623567
commit
44b577cadb
@ -12,6 +12,7 @@ from homeassistant.config_entries import ConfigEntry
|
|||||||
from homeassistant.const import CONF_ACCESS_TOKEN, Platform
|
from homeassistant.const import CONF_ACCESS_TOKEN, Platform
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
from homeassistant.exceptions import ConfigEntryAuthFailed, ConfigEntryNotReady
|
||||||
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
from homeassistant.helpers.config_entry_oauth2_flow import (
|
from homeassistant.helpers.config_entry_oauth2_flow import (
|
||||||
OAuth2Session,
|
OAuth2Session,
|
||||||
async_get_config_entry_implementation,
|
async_get_config_entry_implementation,
|
||||||
@ -49,7 +50,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: WeheatConfigEntry) -> bo
|
|||||||
# fetch a list of the heat pumps the entry can access
|
# fetch a list of the heat pumps the entry can access
|
||||||
try:
|
try:
|
||||||
discovered_heat_pumps = await HeatPumpDiscovery.async_discover_active(
|
discovered_heat_pumps = await HeatPumpDiscovery.async_discover_active(
|
||||||
API_URL, token
|
API_URL, token, async_get_clientsession(hass)
|
||||||
)
|
)
|
||||||
except UnauthorizedException as error:
|
except UnauthorizedException as error:
|
||||||
raise ConfigEntryAuthFailed from error
|
raise ConfigEntryAuthFailed from error
|
||||||
|
@ -8,6 +8,7 @@ from weheat.abstractions.user import async_get_user_id_from_token
|
|||||||
|
|
||||||
from homeassistant.config_entries import SOURCE_REAUTH, ConfigFlowResult
|
from homeassistant.config_entries import SOURCE_REAUTH, ConfigFlowResult
|
||||||
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN, CONF_TOKEN
|
||||||
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
from homeassistant.helpers.config_entry_oauth2_flow import AbstractOAuth2FlowHandler
|
from homeassistant.helpers.config_entry_oauth2_flow import AbstractOAuth2FlowHandler
|
||||||
|
|
||||||
from .const import API_URL, DOMAIN, ENTRY_TITLE, OAUTH2_SCOPES
|
from .const import API_URL, DOMAIN, ENTRY_TITLE, OAUTH2_SCOPES
|
||||||
@ -34,7 +35,9 @@ class OAuth2FlowHandler(AbstractOAuth2FlowHandler, domain=DOMAIN):
|
|||||||
"""Override the create entry method to change to the step to find the heat pumps."""
|
"""Override the create entry method to change to the step to find the heat pumps."""
|
||||||
# get the user id and use that as unique id for this entry
|
# get the user id and use that as unique id for this entry
|
||||||
user_id = await async_get_user_id_from_token(
|
user_id = await async_get_user_id_from_token(
|
||||||
API_URL, data[CONF_TOKEN][CONF_ACCESS_TOKEN]
|
API_URL,
|
||||||
|
data[CONF_TOKEN][CONF_ACCESS_TOKEN],
|
||||||
|
async_get_clientsession(self.hass),
|
||||||
)
|
)
|
||||||
await self.async_set_unique_id(user_id)
|
await self.async_set_unique_id(user_id)
|
||||||
if self.source != SOURCE_REAUTH:
|
if self.source != SOURCE_REAUTH:
|
||||||
|
@ -16,6 +16,7 @@ from weheat.exceptions import (
|
|||||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
from homeassistant.exceptions import ConfigEntryAuthFailed
|
from homeassistant.exceptions import ConfigEntryAuthFailed
|
||||||
|
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||||
from homeassistant.helpers.config_entry_oauth2_flow import OAuth2Session
|
from homeassistant.helpers.config_entry_oauth2_flow import OAuth2Session
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
|
||||||
|
|
||||||
@ -47,7 +48,9 @@ class WeheatDataUpdateCoordinator(DataUpdateCoordinator[HeatPump]):
|
|||||||
update_interval=timedelta(seconds=UPDATE_INTERVAL),
|
update_interval=timedelta(seconds=UPDATE_INTERVAL),
|
||||||
)
|
)
|
||||||
self.heat_pump_info = heat_pump
|
self.heat_pump_info = heat_pump
|
||||||
self._heat_pump_data = HeatPump(API_URL, heat_pump.uuid)
|
self._heat_pump_data = HeatPump(
|
||||||
|
API_URL, heat_pump.uuid, async_get_clientsession(hass)
|
||||||
|
)
|
||||||
|
|
||||||
self.session = session
|
self.session = session
|
||||||
|
|
||||||
|
@ -6,5 +6,5 @@
|
|||||||
"dependencies": ["application_credentials"],
|
"dependencies": ["application_credentials"],
|
||||||
"documentation": "https://www.home-assistant.io/integrations/weheat",
|
"documentation": "https://www.home-assistant.io/integrations/weheat",
|
||||||
"iot_class": "cloud_polling",
|
"iot_class": "cloud_polling",
|
||||||
"requirements": ["weheat==2025.1.14"]
|
"requirements": ["weheat==2025.1.15"]
|
||||||
}
|
}
|
||||||
|
@ -88,9 +88,6 @@ rules:
|
|||||||
While unlikely to happen. Check if it is easily integrated.
|
While unlikely to happen. Check if it is easily integrated.
|
||||||
|
|
||||||
# Platinum
|
# Platinum
|
||||||
async-dependency:
|
async-dependency: done
|
||||||
status: todo
|
inject-websession: done
|
||||||
comment: |
|
|
||||||
Dependency uses asyncio.to_thread, but this is not real async.
|
|
||||||
inject-websession: todo
|
|
||||||
strict-typing: todo
|
strict-typing: todo
|
||||||
|
2
requirements_all.txt
generated
2
requirements_all.txt
generated
@ -3033,7 +3033,7 @@ webio-api==0.1.11
|
|||||||
webmin-xmlrpc==0.0.2
|
webmin-xmlrpc==0.0.2
|
||||||
|
|
||||||
# homeassistant.components.weheat
|
# homeassistant.components.weheat
|
||||||
weheat==2025.1.14
|
weheat==2025.1.15
|
||||||
|
|
||||||
# homeassistant.components.whirlpool
|
# homeassistant.components.whirlpool
|
||||||
whirlpool-sixth-sense==0.18.11
|
whirlpool-sixth-sense==0.18.11
|
||||||
|
2
requirements_test_all.txt
generated
2
requirements_test_all.txt
generated
@ -2437,7 +2437,7 @@ webio-api==0.1.11
|
|||||||
webmin-xmlrpc==0.0.2
|
webmin-xmlrpc==0.0.2
|
||||||
|
|
||||||
# homeassistant.components.weheat
|
# homeassistant.components.weheat
|
||||||
weheat==2025.1.14
|
weheat==2025.1.15
|
||||||
|
|
||||||
# homeassistant.components.whirlpool
|
# homeassistant.components.whirlpool
|
||||||
whirlpool-sixth-sense==0.18.11
|
whirlpool-sixth-sense==0.18.11
|
||||||
|
Loading…
x
Reference in New Issue
Block a user