mirror of
https://github.com/home-assistant/core
synced 2024-08-28 03:36:46 +02:00
Disable IPv6 in the opower integration to fix AEP utilities (#107203)
This commit is contained in:
parent
72e908f6cc
commit
2a9a046fab
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from collections.abc import Mapping
|
from collections.abc import Mapping
|
||||||
import logging
|
import logging
|
||||||
|
import socket
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from opower import (
|
from opower import (
|
||||||
@ -38,7 +39,7 @@ async def _validate_login(
|
|||||||
) -> dict[str, str]:
|
) -> dict[str, str]:
|
||||||
"""Validate login data and return any errors."""
|
"""Validate login data and return any errors."""
|
||||||
api = Opower(
|
api = Opower(
|
||||||
async_create_clientsession(hass),
|
async_create_clientsession(hass, family=socket.AF_INET),
|
||||||
login_data[CONF_UTILITY],
|
login_data[CONF_UTILITY],
|
||||||
login_data[CONF_USERNAME],
|
login_data[CONF_USERNAME],
|
||||||
login_data[CONF_PASSWORD],
|
login_data[CONF_PASSWORD],
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
"""Coordinator to handle Opower connections."""
|
"""Coordinator to handle Opower connections."""
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import logging
|
import logging
|
||||||
|
import socket
|
||||||
from types import MappingProxyType
|
from types import MappingProxyType
|
||||||
from typing import Any, cast
|
from typing import Any, cast
|
||||||
|
|
||||||
@ -51,7 +52,7 @@ class OpowerCoordinator(DataUpdateCoordinator[dict[str, Forecast]]):
|
|||||||
update_interval=timedelta(hours=12),
|
update_interval=timedelta(hours=12),
|
||||||
)
|
)
|
||||||
self.api = Opower(
|
self.api = Opower(
|
||||||
aiohttp_client.async_get_clientsession(hass),
|
aiohttp_client.async_get_clientsession(hass, family=socket.AF_INET),
|
||||||
entry_data[CONF_UTILITY],
|
entry_data[CONF_UTILITY],
|
||||||
entry_data[CONF_USERNAME],
|
entry_data[CONF_USERNAME],
|
||||||
entry_data[CONF_PASSWORD],
|
entry_data[CONF_PASSWORD],
|
||||||
|
Loading…
Reference in New Issue
Block a user