Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/dot-github/workflows/black-24…
Browse files Browse the repository at this point in the history
….10.0
  • Loading branch information
CJNE authored Oct 16, 2024
2 parents 26183ad + ff7e3b8 commit d7f2f1d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pip==24.2
pre-commit==3.8.0
pre-commit==4.0.1
black==24.10.0
flake8==7.1.1
flake8==7.1.1
6 changes: 5 additions & 1 deletion custom_components/myenergi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from homeassistant.core import HomeAssistant
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
from homeassistant.helpers.update_coordinator import UpdateFailed
from homeassistant.helpers.httpx_client import get_async_client
from pymyenergi.client import MyenergiClient
from pymyenergi.connection import Connection

Expand Down Expand Up @@ -48,8 +49,10 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
app_email = entry.data.get(CONF_APP_EMAIL)
app_password = entry.data.get(CONF_APP_PASSWORD)

async_client = get_async_client(hass)

conn = await hass.async_add_executor_job(
Connection, username, password, app_password, app_email
Connection, username, password, app_password, app_email, 20, async_client
)
if app_email and app_password:
await conn.discoverLocations()
Expand Down Expand Up @@ -107,6 +110,7 @@ async def _async_update_data(self):
await self.client.refresh()
await self.client.refresh_history(utc_today, 24, "hour")
except Exception as exception:
_LOGGER.debug(exception)
raise UpdateFailed() from exception


Expand Down
2 changes: 1 addition & 1 deletion custom_components/myenergi/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
NAME = "myenergi"
DOMAIN = "myenergi"
DOMAIN_DATA = f"{DOMAIN}_data"
VERSION = "0.0.28"
VERSION = "0.0.29"

ATTRIBUTION = "Data provided by myenergi"
ISSUE_URL = "https://github.com/CJNE/ha-myenergi/issues"
Expand Down
4 changes: 2 additions & 2 deletions custom_components/myenergi/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"documentation": "https://github.com/cjne/ha-myenergi",
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/cjne/ha-myenergi/issues",
"requirements": ["pymyenergi==0.2.1"],
"version": "0.0.28"
"requirements": ["pymyenergi==0.2.2"],
"version": "0.0.29"
}
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pre-commit==3.8.0
pre-commit==4.0.1
black==24.8.0
flake8==7.1.1
homeassistant
Expand Down

0 comments on commit d7f2f1d

Please sign in to comment.