Skip to content
This repository has been archived by the owner on Jun 20, 2022. It is now read-only.

Commit

Permalink
Bumb aiohwenergy to 0.8.0 to make it compatible for 2022.2 (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
DCSBL authored Feb 3, 2022
1 parent 7f130fb commit d585a5f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
6 changes: 5 additions & 1 deletion custom_components/homewizard_energy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from homeassistant.config_entries import ConfigEntry
from homeassistant.core import HomeAssistant
from homeassistant.exceptions import ConfigEntryNotReady
from homeassistant.helpers.aiohttp_client import async_get_clientsession

from .const import CONF_API, COORDINATOR, DOMAIN, PLATFORMS
from .coordinator import HWEnergyDeviceUpdateCoordinator as Coordinator
Expand All @@ -21,7 +22,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
_LOGGER.debug("__init__ async_setup_entry")

# Get api and do a initialization
energy_api = aiohwenergy.HomeWizardEnergy(entry.data.get("host"))
session = async_get_clientsession(hass)
energy_api = aiohwenergy.HomeWizardEnergy(
entry.data.get("host"), clientsession=session
)

# Validate connection
initialized = False
Expand Down
25 changes: 8 additions & 17 deletions custom_components/homewizard_energy/manifest.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
{
"codeowners": ["@DCSBL"],
"config_flow": true,
"documentation": "https://github.com/DCSBL/ha-homewizard-energy",
"domain": "homewizard_energy",
"iot_class": "local_polling",
"issue_tracker": "https://github.com/DCSBL/ha-homewizard-energy/issues",
"name": "HomeWizard Energy",
"requirements": ["aiohwenergy==0.8.0"],
"version": "0.0.0",
"documentation": "https://github.com/DCSBL/ha-homewizard-energy",
"issue_tracker": "https://github.com/DCSBL/ha-homewizard-energy/issues",
"codeowners": [
"@DCSBL"
],
"dependencies": [
"zeroconf"
],
"requirements": [
"aiohwenergy==0.4.0"
],
"zeroconf": [
"_hwenergy._tcp.local."
],
"config_flow": true,
"iot_class": "local_polling"
}
"zeroconf": ["_hwenergy._tcp.local."]
}

0 comments on commit d585a5f

Please sign in to comment.