Use ssl util in Tibber (#123369)

Tibber: Use homeassistant.util.ssl
This commit is contained in:
functionpointer 2024-08-28 03:04:08 +02:00 committed by GitHub
parent 8fee1975b4
commit e447d83024
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,7 +18,7 @@ from homeassistant.helpers import discovery
from homeassistant.helpers.aiohttp_client import async_get_clientsession from homeassistant.helpers.aiohttp_client import async_get_clientsession
import homeassistant.helpers.config_validation as cv import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.typing import ConfigType from homeassistant.helpers.typing import ConfigType
from homeassistant.util import dt as dt_util from homeassistant.util import dt as dt_util, ssl as ssl_util
from .const import DATA_HASS_CONFIG, DOMAIN from .const import DATA_HASS_CONFIG, DOMAIN
from .services import async_setup_services from .services import async_setup_services
@ -47,6 +47,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
access_token=entry.data[CONF_ACCESS_TOKEN], access_token=entry.data[CONF_ACCESS_TOKEN],
websession=async_get_clientsession(hass), websession=async_get_clientsession(hass),
time_zone=dt_util.get_default_time_zone(), time_zone=dt_util.get_default_time_zone(),
ssl=ssl_util.get_default_context(),
) )
hass.data[DOMAIN] = tibber_connection hass.data[DOMAIN] = tibber_connection