1
0
mirror of https://github.com/home-assistant/core.git synced 2026-02-15 07:36:16 +00:00

Pass aiohttp websession to librehardwaremonitor-api (#161741)

This commit is contained in:
Sab44
2026-01-28 14:20:59 +01:00
committed by GitHub
parent 825da95550
commit 9c27e1233e
2 changed files with 3 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_PORT, CONF_USERNA
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryAuthFailed
from homeassistant.helpers import device_registry as dr
from homeassistant.helpers.aiohttp_client import async_create_clientsession
from homeassistant.helpers.device_registry import DeviceEntry
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator, UpdateFailed
@@ -55,6 +56,7 @@ class LibreHardwareMonitorCoordinator(DataUpdateCoordinator[LibreHardwareMonitor
port=config_entry.data[CONF_PORT],
username=config_entry.data.get(CONF_USERNAME),
password=config_entry.data.get(CONF_PASSWORD),
session=async_create_clientsession(hass),
)
device_entries: list[DeviceEntry] = dr.async_entries_for_config_entry(
registry=dr.async_get(self.hass), config_entry_id=config_entry.entry_id

View File

@@ -74,5 +74,5 @@ rules:
stale-devices: done
# Platinum
async-dependency: done
inject-websession: todo
inject-websession: done
strict-typing: done