Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
775 commits
Select commit Hold shift + click to select a range
a80d1f8
Try adding initial NodeInfoRequest to the Stick
bouwew Feb 7, 2025
7ac2966
Add Stick NodeInfoResponse
bouwew Feb 7, 2025
ad07d41
Fix
bouwew Feb 7, 2025
97ff1f6
Debug, full test-output
bouwew Feb 7, 2025
005cd03
Fix data
bouwew Feb 7, 2025
5f66b02
Add Stick properties
bouwew Feb 7, 2025
e725439
Add stick-hw-fw asserts
bouwew Feb 7, 2025
4de7fa7
Use existing function
bouwew Feb 9, 2025
5c6ee50
Back to short test-output
bouwew Feb 9, 2025
20c3a05
Enter real stick-response data
bouwew Feb 9, 2025
1ab24c6
Debug
bouwew Feb 9, 2025
353babb
Handle Stick zero-response for firmware
bouwew Feb 9, 2025
52ca30a
Fix assert
bouwew Feb 9, 2025
d567a55
Disable
bouwew Feb 9, 2025
642afaa
Try
bouwew Feb 9, 2025
e308aef
Debug
bouwew Feb 9, 2025
553fd1a
Fixes
bouwew Feb 9, 2025
d091509
Try
bouwew Feb 9, 2025
35eca75
Add debug-message
bouwew Feb 9, 2025
e35f618
Try
bouwew Feb 9, 2025
8a346a9
Remove logging, add missing
bouwew Feb 12, 2025
fa9c93e
Fix
bouwew Feb 12, 2025
6653327
Update stick hardware assert
bouwew Feb 12, 2025
d5002b2
Try
bouwew Feb 12, 2025
59929da
Add stick firmware-assert
bouwew Feb 12, 2025
a54085c
Remove, not needed
bouwew Feb 12, 2025
db20372
Collect Stick data during initialization
bouwew Feb 12, 2025
5b88ecf
Adapt asserts
bouwew Feb 12, 2025
55f9dc0
Translate to short hardware-version
bouwew Feb 12, 2025
833c674
Adapt and clean-up test-asserts
bouwew Feb 12, 2025
119dc11
Clean up debug-logging
bouwew Feb 12, 2025
5c089c6
Clean-up
bouwew Feb 12, 2025
513dfd7
Pylint fix
bouwew Feb 12, 2025
421c171
Bump to a30
bouwew Feb 12, 2025
792de99
Add Stick-name property
bouwew Feb 13, 2025
21be3e1
Add related test-assert
bouwew Feb 13, 2025
5efdb4e
Bump to a31
bouwew Feb 13, 2025
84fafd3
Simplify property-names, improve
bouwew Feb 13, 2025
d485fce
Fix
bouwew Feb 13, 2025
490c5d5
Try negative amounts of pulses
bouwew Feb 19, 2025
5369843
Disable protection
bouwew Feb 19, 2025
5cfb363
Try method from PHP-code
bouwew Feb 19, 2025
78cd19b
Change to a production/negative power return and assert
bouwew Feb 21, 2025
5753961
Bump to a33
bouwew Feb 21, 2025
d87c8c7
Handle negative energy-pulse values
bouwew Mar 3, 2025
c99342c
Extend logging showing production pulses
bouwew Mar 5, 2025
59ec82d
Add debug-message showing CircleEnergyLog data
bouwew Mar 10, 2025
03511bb
Add MAC to CircleEnergy log-message
bouwew Mar 23, 2025
595c163
Add collected_pulses debug-logging
bouwew Mar 13, 2025
5c0846e
Fix typo in logging
bouwew Mar 13, 2025
a8ffcc0
Extend collected_pulses logging
bouwew Mar 14, 2025
2df5ec3
Add_log(): support both cons-/prod-type of logs
bouwew Mar 23, 2025
7a1cddc
Add missing await for energy_log_update()
bouwew Mar 16, 2025
654877d
Add missing line in _reset_log_references()
bouwew Mar 17, 2025
d9a52f5
Formatting, remove wrong guarding(?)
bouwew Mar 23, 2025
5fa0571
Don't update production_log_refs when not required
bouwew Mar 18, 2025
aa75afa
Formatting
bouwew Mar 23, 2025
5f93fd4
Add guarding for production _energy_statistics
bouwew Mar 23, 2025
980fadf
Don't update production rollover when no production
bouwew Mar 18, 2025
98c7fe5
Update _update_rollover() docstring
bouwew Mar 22, 2025
5725c5d
Output production-statistics as positive values
bouwew Mar 23, 2025
e94bf1e
Bump to a55
bouwew Mar 23, 2025
0bcdda1
Change-update _logs_missing logging
bouwew Mar 23, 2025
11c09f8
Improve logging, formatting
bouwew Mar 23, 2025
01217b3
Bump to a56
bouwew Mar 23, 2025
4cddf42
Pulses_production/_produced are negative
bouwew Mar 23, 2025
b25b034
Bump to a57
bouwew Mar 23, 2025
f075bbc
Formatting
bouwew Mar 23, 2025
a2b9bb2
Formatting
bouwew Mar 23, 2025
23963c8
Set MAX_LOG_HOURS to 24
bouwew Mar 23, 2025
75b9403
Bump to a58
bouwew Mar 23, 2025
eb3bbe5
Add idea-text to update_pulse_counter() docstring
bouwew Mar 23, 2025
7c6e545
update_pulse_counter(): add rollover log-debug-messages
bouwew Mar 24, 2025
62fc1ee
collected_pulses(): don't return None's at rollover
bouwew Mar 24, 2025
eb6a964
Set to a59
bouwew Mar 24, 2025
75929cc
Fix related test-assert
bouwew Mar 24, 2025
fbb2bad
Fix 2nd related test-assert
bouwew Mar 24, 2025
f94e6bf
Remove commented-out code
bouwew Mar 24, 2025
fd05362
Clean up update_pulse_counter() docstring
bouwew Mar 24, 2025
01c7295
Revert back to WEEK_IN_HOURS
bouwew Mar 24, 2025
47b6da3
Bump to a60
bouwew Mar 24, 2025
b285c0b
_add_log_record(): formatting
bouwew Mar 24, 2025
e9c8d31
Fix typo in comment
bouwew Mar 24, 2025
c3c6691
Formatting
bouwew Mar 26, 2025
809ca8e
Add pulsecounter_reset booleans, and detection
bouwew Mar 26, 2025
a22f480
Add counter_reset guarding for log_pulses reset
bouwew Mar 27, 2025
8e8f199
Improve
bouwew Mar 27, 2025
f24657c
Bump to a62
bouwew Mar 27, 2025
380ab96
Use common _pulsecounter_reset to reset both counters while only one …
bouwew Mar 27, 2025
055613c
Bump to a63
bouwew Mar 27, 2025
b7b1255
Set MAX_LOG_HOURS to DAY_IN_HOURS
bouwew Mar 27, 2025
13f6168
Remove all week-related EnergyTypes
bouwew Mar 27, 2025
e1adbf0
Start cleaning week-related test-asserts
bouwew Mar 27, 2025
1528562
Counter.py: clean up imports
bouwew Mar 27, 2025
66a4884
Don't use gather
bouwew Mar 27, 2025
1034ec2
Bump to a64
bouwew Mar 27, 2025
2038713
_collect_pulses_from_logs(): add debug-logging
bouwew Mar 28, 2025
a3ea157
Fix typo in comment
bouwew Mar 28, 2025
0dca617
Bump to a65
bouwew Mar 28, 2025
de3f8a5
Try to not block the event_loop
bouwew Mar 28, 2025
1af5565
Bump to a66
bouwew Mar 28, 2025
b0180b3
Revert "Try to not block the event_loop"
bouwew Mar 28, 2025
c76d502
Try something else
bouwew Mar 28, 2025
8d39797
Bump to a67
bouwew Mar 28, 2025
6431c87
Improve _collect_pulses_from_logs()
bouwew Mar 28, 2025
f908401
Bump to a68
bouwew Mar 28, 2025
6556eaf
Try to avoid using asyncio_sleep()
bouwew Mar 28, 2025
7fe9c07
Bump to a69
bouwew Mar 28, 2025
3e196b7
Collect last_hourly_reset timestamps
bouwew Mar 30, 2025
8b41cc0
Line up interval reset with device hourly pulsecounter reset
bouwew Mar 30, 2025
af8addd
Adapt hourly reset time, add hourly_reset_time test-assert
bouwew Mar 30, 2025
c17b2bf
Improve hourly_reset_time property
bouwew Mar 30, 2025
aaa0bfd
Add debug logging
bouwew Mar 30, 2025
0256c52
Fix walrus
bouwew Mar 30, 2025
12ed988
Test: line up 2nd test-time
bouwew Mar 30, 2025
6fed2ba
Bump to a71
bouwew Mar 30, 2025
34c1d15
Reset log_pulses after pulsecounter resets.
bouwew Mar 30, 2025
010b831
Revert changes in counter.py
bouwew Mar 30, 2025
c7775eb
Fixes
bouwew Mar 30, 2025
661f60e
Add/improve testing
bouwew Mar 30, 2025
f85a45d
Bump to a72
bouwew Mar 30, 2025
86192a1
Init new selfs
bouwew Mar 30, 2025
aca2fe0
Add testcase for midnight rollover
bouwew Mar 31, 2025
99fa2d4
Remove double resetting of log_pulses
bouwew Mar 31, 2025
402dd36
More debug
bouwew Mar 31, 2025
8abb87f
Party revert removal
bouwew Mar 31, 2025
a05c2bc
Add add_log debugging
bouwew Mar 31, 2025
1286255
Try test
bouwew Mar 31, 2025
c149c73
Try update _last_log_consumption_timestamp
bouwew Mar 31, 2025
192edcc
Try test 2
bouwew Mar 31, 2025
182936d
Try test 3
bouwew Apr 1, 2025
c2a26de
More debug
bouwew Apr 1, 2025
4267a33
Try test 4
bouwew Apr 1, 2025
a930ff7
Extend update_pulse-counter logging
bouwew Apr 1, 2025
89e2903
Clean up test-code
bouwew Apr 1, 2025
0d8ee4c
Reorganize updfate_pulse_counter()
bouwew Apr 1, 2025
195ce81
Revert most
bouwew Apr 1, 2025
edce9f5
Combine loggers
bouwew Apr 1, 2025
8af03c9
Clean up test-debugging
bouwew Apr 1, 2025
78dea1e
Bump to a73
bouwew Apr 1, 2025
6766311
Pre-commit fixes
bouwew Apr 1, 2025
64b9196
Extend docstring of hourly_reset_time property
bouwew Apr 1, 2025
402876d
Add comment on log_time_stamp changes
bouwew Apr 1, 2025
19e3c69
Shorten log_time_stamp
bouwew Apr 1, 2025
bc57379
Remove week-related from api
bouwew Apr 2, 2025
d1f4c7b
Delay/sync the from_timestamps as well
bouwew Apr 2, 2025
4a550b7
Bump to a74
bouwew Apr 2, 2025
a11f867
Revert from_timestamp additions, add properties instead
bouwew Apr 2, 2025
f01f93c
Sync the daily reset time with the device pulsecounter(s) reset
bouwew Apr 2, 2025
dcd25ee
Fix missing logic
bouwew Apr 2, 2025
97dbaec
Fix missing hour-reset
bouwew Apr 2, 2025
6176457
Bump to a75
bouwew Apr 2, 2025
15d7a29
Consumption/production last_hourly resets are the same
bouwew Apr 2, 2025
41e37f9
Adapt code in counter.py
bouwew Apr 2, 2025
c1760ba
Fix missing line
bouwew Apr 2, 2025
a29cb18
Don't use self, use availble input
bouwew Apr 3, 2025
fc0db89
Revert deletion, improve debug-logging
bouwew Apr 3, 2025
44762d3
Bump to a76
bouwew Apr 3, 2025
05e7aac
Fix datetime attributes
bouwew Apr 3, 2025
78e9c9f
Bump to a77
bouwew Apr 3, 2025
67fb8bf
Refactor update_rollover()
bouwew Apr 3, 2025
f0be9ef
_detect_rollover(): full coverage by using <=
bouwew Apr 3, 2025
f745823
Test: add log after pulse counter reset timestamp
bouwew Apr 3, 2025
3af9ff8
Improve comment
bouwew Apr 4, 2025
29a593f
Add working-comments
bouwew Apr 4, 2025
bca13ec
Remove double occurence
bouwew Apr 4, 2025
3a1b4e1
Remove last_hourly_reset
bouwew Apr 4, 2025
98a622f
Use the pulse_counter_reset event to update the daily last_reset
bouwew Apr 4, 2025
383a113
Improve comment
bouwew Apr 4, 2025
fddb623
Remove working-comments
bouwew Apr 4, 2025
9531600
Bump to a78
bouwew Apr 4, 2025
33f2262
Use sorted logs to collect log_pulses
bouwew Apr 5, 2025
fcaf9dc
Update last_reset logic once more
bouwew Apr 5, 2025
aac2739
Bump to a79
bouwew Apr 5, 2025
0c37cce
Last_reset: handle state after pulse_counter reset returns back to False
bouwew Apr 5, 2025
06dedc9
Bump to a80
bouwew Apr 5, 2025
d9f5e76
Improve refactoring of _update_rollover()
bouwew Apr 4, 2025
8d53a72
_update_log_references(): don't sync to pulse-counter reset
bouwew Apr 6, 2025
d283909
Correct rollover assert
bouwew Apr 6, 2025
b11bf1c
Bump to a81
bouwew Apr 6, 2025
1e06137
Add missing line
bouwew Apr 6, 2025
2ea902c
counter-update: add debug-logging
bouwew Apr 7, 2025
e5c9aa6
Bump to a82
bouwew Apr 7, 2025
dd0dfb1
Improve counter update()
bouwew Apr 7, 2025
28f021d
Bump to a83
bouwew Apr 7, 2025
a2487b6
Add missing @property
bouwew Apr 7, 2025
75eba65
Bump to a84
bouwew Apr 7, 2025
f46d4be
Remove hourly-reset related, not used
bouwew Apr 7, 2025
952a40d
Remove related test-assert
bouwew Apr 7, 2025
93191f6
Revert debug-logging related changes
bouwew Apr 7, 2025
29cfc3d
Add extra guarding for setting _midnight_reset_passed to True
bouwew Apr 8, 2025
72df1c3
Bump to a85
bouwew Apr 8, 2025
84f3a5f
Clean up
bouwew Apr 8, 2025
db3af5f
Move setting _midnight_reset_passed
bouwew Apr 9, 2025
1c09e44
Bump to a86
bouwew Apr 9, 2025
2651cbd
Improve midnight reset delaying code further
bouwew Apr 10, 2025
e3e94e4
Bump to a87
bouwew Apr 10, 2025
a9372c3
Test last_reset.hour before setting hour to 0
bouwew Apr 11, 2025
998091d
Bump to a88
bouwew Apr 11, 2025
4c3504a
Remove debug-logging for testing
bouwew Apr 12, 2025
6dd3fcc
Bump to a89
bouwew Apr 12, 2025
4548fc7
Publish on Pypi for async branch too
bouwew Apr 16, 2025
a87ad8b
Set to v0.40.0b0
bouwew Apr 16, 2025
b9fcae2
Fix typo
bouwew Apr 17, 2025
71d94af
Bump to v0.40.0b1
bouwew Apr 16, 2025
9fe1ed1
Bump CACHE_VERSION
bouwew Apr 17, 2025
e75411f
Python version fixes
bouwew Apr 18, 2025
069a53d
Merge pull request #225 from plugwise/fix-py-version
bouwew Apr 18, 2025
a1f7e57
HOI debug
bouwew Apr 21, 2025
bc1c9dd
Full test-output
bouwew Apr 21, 2025
a0400e4
Call allow_join_request() via accept_join_request setter
bouwew Apr 21, 2025
0970fc2
Revert
bouwew Apr 21, 2025
f48143a
Enable/disable automatic joining based on accept_join_request
bouwew Apr 21, 2025
50e4866
Limit sending allow_join_request()
bouwew Apr 21, 2025
3ebd300
Bump to a90
bouwew Apr 21, 2025
5563730
Update _old_acc_join_req
bouwew Apr 21, 2025
0f7566f
Bump to a91
bouwew Apr 21, 2025
07777a2
Execute allow_join_requests() after network.is_running
bouwew Apr 21, 2025
0aae699
Break out
bouwew Apr 22, 2025
915f66c
Execute allow_join_requests() with accept_join_request state being set
bouwew Apr 22, 2025
dad4892
Clean up, add logger
bouwew Apr 22, 2025
010c1dd
Bump to a92
bouwew Apr 22, 2025
91cb465
Handle async function-call properly
bouwew Apr 22, 2025
d35046c
Correct syntax
bouwew Apr 22, 2025
8cc057b
Remove double code
bouwew Apr 22, 2025
2b3ec02
Try async setter construct
bouwew Apr 22, 2025
2ee9d07
Fix testing
bouwew Apr 22, 2025
9639ec0
Try calling allow_join_requests via create_task()
bouwew Apr 22, 2025
be029ea
Bump to a93
bouwew Apr 22, 2025
b198e08
Remove unused
bouwew Apr 23, 2025
7c2eaf0
Register node in node_join_available_message()
bouwew Apr 23, 2025
59d0091
Bump to a94
bouwew Apr 23, 2025
d64cb37
Improve debug-message
bouwew Apr 23, 2025
fbba2ab
Add missing await
bouwew Apr 23, 2025
1221ba2
Bump to a95
bouwew Apr 23, 2025
f7cb776
Change debug-message
bouwew Apr 23, 2025
044784d
Set asyncio_default_fixture_loop_scope to "session"
bouwew Apr 23, 2025
4a81215
Bump CACHE_VERSION
bouwew Apr 23, 2025
0279a41
Update actions/* versions
bouwew Apr 23, 2025
935f50b
More version-updates
bouwew Apr 23, 2025
2aa3711
Disable testcase
bouwew Apr 24, 2025
9b3a423
Bump to a96
bouwew Apr 25, 2025
032b76e
Base NodeAddRequest on StickResponse
bouwew Apr 25, 2025
e82f235
Add new found firmware version
bouwew Apr 25, 2025
3e4c0a7
Bump to a97
bouwew Apr 25, 2025
8cd60eb
Change max version to 2.5 for added firware
bouwew Apr 25, 2025
96d0a0c
Bump to a98
bouwew Apr 25, 2025
14c7c3d
Correct corrected_pulses to 0 when negative
bouwew Apr 25, 2025
a466fbe
Bump to a99
bouwew Apr 25, 2025
f8aa344
Revert "Correct corrected_pulses to 0 when negative"
bouwew Apr 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ name: Latest release

env:
CACHE_VERSION: 21
DEFAULT_PYTHON: "3.12"
DEFAULT_PYTHON: "3.13"

# Only run on merges
on:
pull_request:
types: closed
branches:
- main
- async

jobs:
publishing:
Expand All @@ -22,10 +23,10 @@ jobs:
if: github.event.pull_request.merged == true
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Install pypa/build
Expand Down
94 changes: 46 additions & 48 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
name: Latest commit

env:
CACHE_VERSION: 22
DEFAULT_PYTHON: "3.12"
CACHE_VERSION: 10
DEFAULT_PYTHON: "3.13"
PRE_COMMIT_HOME: ~/.cache/pre-commit

on:
Expand All @@ -22,15 +22,15 @@ jobs:
name: Prepare
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand All @@ -48,12 +48,11 @@ jobs:
pip install virtualenv --upgrade
python -m venv venv
. venv/bin/activate
pip install uv
uv pip install -U pip setuptools wheel
uv pip install -r requirements_test.txt -r requirements_commit.txt
pip install -U pip setuptools wheel
pip install -r requirements_test.txt -r requirements_commit.txt
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
Expand All @@ -72,17 +71,17 @@ jobs:
needs: prepare
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
with:
persist-credentials: false
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand All @@ -98,7 +97,7 @@ jobs:
- name: Ruff (check)
run: |
. venv/bin/activate
#ruff check plugwise_usb/*py tests/*py
#ruff plugwise_usb/*py tests/*py
echo "***"
echo "***"
echo "Code is not up to par for ruff, skipping"
Expand All @@ -108,7 +107,7 @@ jobs:
if: failure()
run: |
. venv/bin/activate
ruff check --fix plugwise_usb/*py tests/*py
ruff --fix plugwise_usb/*py tests/*py
git config --global user.name 'autoruff'
git config --global user.email 'plugwise_usb@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.PAT_CT }}@github.com/$GITHUB_REPOSITORY
Expand All @@ -125,15 +124,15 @@ jobs:
- dependencies_check
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand All @@ -148,7 +147,7 @@ jobs:
exit 1
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
Expand All @@ -173,18 +172,18 @@ jobs:
needs: commitcheck
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
python-version: ["3.13"]
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand All @@ -200,32 +199,31 @@ jobs:
run: |
python -m venv venv
. venv/bin/activate
pip install uv
uv pip install -U pip setuptools wheel
# uv pip install -r requirements_test.txt
pip install -U pip setuptools wheel
#pip install -r requirements_test.txt
# 20220124 Mimic setup_test.sh
uv pip install --upgrade -r requirements_test.txt -c https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt
uv pip install --upgrade pytest-asyncio
pip install --upgrade -r requirements_test.txt -c https://raw.githubusercontent.com/home-assistant/core/dev/homeassistant/package_constraints.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test.txt -r https://raw.githubusercontent.com/home-assistant/core/dev/requirements_test_pre_commit.txt
pip install --upgrade pytest-asyncio

pytest:
runs-on: ubuntu-latest
name: Run pytest using Python ${{ matrix.python-version }}
needs: prepare-test-cache
strategy:
matrix:
python-version: ["3.12", "3.11", "3.10"]
python-version: ["3.13"]

steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ matrix.python-version }}
- name: Restore full Python ${{ matrix.python-version }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand All @@ -242,7 +240,7 @@ jobs:
. venv/bin/activate
pytest --log-level info tests/*.py --cov='.'
- name: Upload coverage artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.6.2
with:
name: coverage-${{ matrix.python-version }}
path: .coverage
Expand All @@ -255,17 +253,17 @@ jobs:
needs: pytest
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
with:
persist-credentials: false
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand Down Expand Up @@ -295,7 +293,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master

Expand All @@ -305,7 +303,7 @@ jobs:
name: Dependency
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Run dependency checker
run: scripts/dependencies_check.sh debug

Expand All @@ -315,15 +313,15 @@ jobs:
needs: pytest
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand All @@ -337,7 +335,7 @@ jobs:
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Download all coverage artifacts
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.2.1
- name: Combine coverage results
run: |
. venv/bin/activate
Expand All @@ -350,7 +348,7 @@ jobs:
echo "***"
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v5.4.2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

Expand All @@ -360,15 +358,15 @@ jobs:
needs: [coverage, mypy]
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand Down Expand Up @@ -403,15 +401,15 @@ jobs:
needs: coverage
steps:
- name: Check out committed code
uses: actions/checkout@v4
uses: actions/checkout@4.2.2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.5.0
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: venv
key: >-
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tests/__pycache__
.coverage
.vscode
venv
.venv
fixtures/*
!fixtures/.keep
*.sedbck
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ci:

default_language_version:
# force all unspecified python hooks to run python3
python: python3.12
python: python3.13

repos:
# Run manually in CI skipping the branch checks
Expand Down
20 changes: 15 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
# Changelog

## Ongoing
## v0.40.0 (a22)

- Ensure CI process remains operational
- Bumped pip to now prepend uv for using quicker dependency resolving and installing
- As for latest HA Core USB team should rework to python 3.12 (not still 3.10)
- Correcting messageflow to HA

## v0.40.0 (a4)

Full rewrite of library into async version. Main list of changes:

- Full async and typed
- Improved protocol handling
- Support for local caching of collected data to improve startup and device detection
- Improved handling of edge cases especially for energy data collection
- Based on detected firmware version enable the supported features
- API details about supported data is combined into api.py
- Added tests

## v0.31.4(a0)

- Re-add python 3.12 checks and compatibility

## v0.31.3

- Bugfix midnight rollover for cicrles without power usage registered during first hour(s)
- Bugfix midnight rollover for circles without power usage registered during first hour(s)

## v0.31.2

Expand Down
Loading
Loading