Skip to content

Commit

Permalink
Merge pull request #50 from hostcc/bug/history-processing
Browse files Browse the repository at this point in the history
fix: Updated `pyg90alarm` dependency for better history processing
  • Loading branch information
hostcc authored Dec 14, 2024
2 parents 599103d + 5f3c6fd commit 92f00b2
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ jobs:
allowUpdates: false
draft: false
generateReleaseNotes: true
prerelease: false
prerelease: true
tag: ${{ steps.version.outputs.nextStrict }}
2 changes: 1 addition & 1 deletion custom_components/gs_alarm/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
],
"quality_scale": "gold",
"requirements": [
"pyg90alarm==1.16.0"
"pyg90alarm==1.16.1"
],
"version": "1.22.0"
}
2 changes: 1 addition & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ pytest==8.3.3
pytest-cov==6.0.0
pytest-unordered==0.6.1
mypy[reports]==1.11.1
pyg90alarm==1.16.0
pyg90alarm==1.16.1
11 changes: 11 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ def mock_g90alarm(request: pytest.FixtureRequest) -> Iterator[AlarmMockT]:

mock.return_value.history = AsyncMock(
return_value=[
# Valid entry
pyg90alarm.history.G90History(
type=2,
event_id=3,
Expand All @@ -179,6 +180,16 @@ def mock_g90alarm(request: pytest.FixtureRequest) -> Iterator[AlarmMockT]:
sensor_name='',
unix_time=3,
other=''
),
# Invalid entry (wrong source)
pyg90alarm.history.G90History(
type=2,
event_id=3,
source=254,
state=0,
sensor_name='',
unix_time=3,
other=''
)
]
)
Expand Down

0 comments on commit 92f00b2

Please sign in to comment.