mirror of
https://github.com/home-assistant/core.git
synced 2025-07-12 15:57:06 +00:00
Use aiohttp.ClientSession in EmoncmsClient (#119989)
This commit is contained in:
parent
49349de74e
commit
6dc680d251
@ -4,5 +4,5 @@
|
||||
"codeowners": ["@borpin", "@alexandrecuer"],
|
||||
"documentation": "https://www.home-assistant.io/integrations/emoncms",
|
||||
"iot_class": "local_polling",
|
||||
"requirements": ["pyemoncms==0.0.6"]
|
||||
"requirements": ["pyemoncms==0.0.7"]
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ from homeassistant.const import (
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers import template
|
||||
from homeassistant.helpers.aiohttp_client import async_get_clientsession
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
||||
@ -87,7 +88,7 @@ async def async_setup_platform(
|
||||
if value_template is not None:
|
||||
value_template.hass = hass
|
||||
|
||||
emoncms_client = EmoncmsClient(url, apikey)
|
||||
emoncms_client = EmoncmsClient(url, apikey, session=async_get_clientsession(hass))
|
||||
elems = await emoncms_client.async_list_feeds()
|
||||
|
||||
if elems is None:
|
||||
|
@ -1827,7 +1827,7 @@ pyefergy==22.5.0
|
||||
pyegps==0.2.5
|
||||
|
||||
# homeassistant.components.emoncms
|
||||
pyemoncms==0.0.6
|
||||
pyemoncms==0.0.7
|
||||
|
||||
# homeassistant.components.enphase_envoy
|
||||
pyenphase==1.20.3
|
||||
|
Loading…
x
Reference in New Issue
Block a user