Skip to content

Commit

Permalink
Rethink pinned dependencies to avoid conflicts (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdpuk committed Jul 9, 2024
1 parent 7c35d87 commit 4a36d7c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""High-level methods for interacting with a remote system."""

from datetime import datetime
from typing import Optional

from arrow import Arrow
from typing_extensions import deprecated # type: ignore[attr-defined]

from custom_components.givenergy_local.givenergy_modbus.model import TimeSlot
Expand Down Expand Up @@ -268,7 +268,7 @@ def reset_discharge_slot_2() -> list[TransparentRequest]:
return _set_charge_slot(True, 2, None)


def set_system_date_time(dt: Arrow) -> list[TransparentRequest]:
def set_system_date_time(dt: datetime) -> list[TransparentRequest]:
"""Set the date & time of the inverter."""
return [
WriteHoldingRegisterRequest(RegisterMap.SYSTEM_TIME_YEAR, dt.year - 2000),
Expand Down
7 changes: 2 additions & 5 deletions custom_components/givenergy_local/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
"iot_class": "local_polling",
"issue_tracker": "https://github.com/cdpuk/givenergy-local/issues",
"requirements": [
"aiofiles==0.8.0",
"arrow==1.2.3",
"crccheck==1.3.0",
"pydantic==1.10.15",
"aenum==3.1.12"
"crccheck~=1.3",
"pydantic>=1.10.12,<2"
],
"version": "0.0.1"
}
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "GivEnergy Local",
"hacs": "1.6.0",
"homeassistant": "2023.1.0",
"homeassistant": "2023.10.0",
"render_readme": true
}
12 changes: 7 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
aiofiles==0.8.0
arrow==1.2.3
crccheck==1.3.0
pydantic==1.10.15
aenum==3.1.12
crccheck~=1.3

# HA 2023.10 was pinned to 1.10.12
# pydantic v2 is known to have breaking changes
pydantic>=1.10.12,<2

# Don't pin the HA version
homeassistant

0 comments on commit 4a36d7c

Please sign in to comment.