Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small update to home load handling #512

Merged
merged 105 commits into from
Sep 27, 2024
Merged
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
ca47fe2
Initial commit for support of all schedule types, and fix for histori…
tmenguy Feb 20, 2024
0962f81
Corrected devices to use hstoryMixin to get energy
tmenguy Feb 20, 2024
7faa1ad
Merged historyMixin and Energy has they are effectively doing the sum…
tmenguy Feb 20, 2024
4db8c5c
removed the daily update
tmenguy Feb 24, 2024
9bfe32a
added a reset measures method to be used directly by external libreries
tmenguy Feb 24, 2024
aa841c4
reset now resets timings too
tmenguy Feb 26, 2024
f763785
Try to get a proper historical data in case of peak / off_peak energy…
tmenguy Mar 7, 2024
e8f3065
Fixed correctly the timing end/start of measures
tmenguy Mar 10, 2024
628e610
Fixed correctly the timing end/start of measures
tmenguy Mar 10, 2024
08ac5f6
Fixed correctly the timing end/start of measures
tmenguy Mar 10, 2024
cf198ec
support correct empty measures
tmenguy Mar 10, 2024
3af2cd3
removed specidif energy exception to use th egeneric API error, 0lus …
tmenguy Mar 10, 2024
e413911
removed specidif energy exception to use th egeneric API error, 0lus …
tmenguy Mar 10, 2024
4765304
removed specidif energy exception to use th egeneric API error, 0lus …
tmenguy Mar 10, 2024
9efb0f3
removed specidif energy exception to use th egeneric API error, 0lus …
tmenguy Mar 11, 2024
fdce0cc
async update for all homes
tmenguy Mar 11, 2024
2407b39
async update for all homes
tmenguy Mar 12, 2024
9e82e1a
async update for all homes
tmenguy Mar 13, 2024
938080a
async update for all homes
tmenguy Mar 13, 2024
5ad1fe1
async update for all homes
tmenguy Mar 13, 2024
3ab9ec0
async update for all homes
tmenguy Mar 13, 2024
1cb8d3e
async update for all homes
tmenguy Mar 14, 2024
2c3e4ea
async update for all homes
tmenguy Mar 15, 2024
2fde124
async update for all homes
tmenguy Mar 15, 2024
72508f3
added some tests for historical data
tmenguy Mar 15, 2024
e0d6a1f
added some tests for historical data
tmenguy Mar 17, 2024
024344a
added a way to get the data sum
tmenguy Mar 17, 2024
252280e
added throttling exception
tmenguy Mar 18, 2024
9b4c539
fix for num calls estimation
tmenguy Mar 19, 2024
c88c2f3
fix for num calls estimation
tmenguy Mar 23, 2024
d593bfa
changed type for energy
tmenguy Mar 25, 2024
645b3d7
changed type for energy
tmenguy Mar 25, 2024
9c6e16c
Added historical retrival for other state, begining only for power (t…
tmenguy Mar 26, 2024
936aeb9
Added historical retrival for other state, begining only for power (t…
tmenguy Mar 26, 2024
7f626ed
Added historical retrival for other state, begining only for power (t…
tmenguy Mar 26, 2024
8431020
Added historical retrival for other state, begining only for power (t…
tmenguy Mar 26, 2024
c3b55ef
Added historical retrival for other state, begining only for power (t…
tmenguy Mar 26, 2024
001f92e
Added historical retrival for other state, begining only for power (t…
tmenguy Mar 26, 2024
6170e9f
Added historical retrival for other state, begining only for power (t…
tmenguy Mar 26, 2024
1ca53b7
Merge remote-tracking branch 'upstream/master' into development
tmenguy Mar 26, 2024
8350914
Merge remote-tracking branch 'upstream/development' into development
tmenguy Mar 26, 2024
acc7331
Added historical retrival for other state, begining only for power (t…
tmenguy Mar 26, 2024
59f6cc9
all tests pass
tmenguy Mar 27, 2024
7b9b6dc
added energy sum
tmenguy Mar 27, 2024
89c7309
added energy sum
tmenguy Mar 27, 2024
238ccea
added energy sum
tmenguy Mar 28, 2024
abf5680
added energy sum
tmenguy Mar 28, 2024
666297b
PEP cleaning to prepare PR
tmenguy Mar 29, 2024
25d7bfa
adjusting estimation calculus
tmenguy Apr 4, 2024
0f8731e
adjusting estimation calculus
tmenguy Apr 4, 2024
adca869
adjusting estimation calculus
tmenguy Apr 4, 2024
ce496cf
slight refactor for readability
tmenguy Apr 8, 2024
4a9c9fb
Support error for unreachable home and bridges ....it is an error, no…
tmenguy Apr 9, 2024
3e5c70e
Support error for unreachable home and bridges ....it is an error, no…
tmenguy Apr 9, 2024
ce7ca84
remove global energy sum support, no needed anymore, was adding compl…
tmenguy Apr 18, 2024
c26f66d
remove global energy sum support, no needed anymore, was adding compl…
tmenguy Apr 18, 2024
a756d1b
refactor to use self.homes where it should be
tmenguy Apr 20, 2024
d2dceec
setting schedules list back as the global list of schedules, for retr…
tmenguy Apr 20, 2024
018c04c
Black....
tmenguy May 5, 2024
f161af9
Ruff....
tmenguy May 5, 2024
ca51a00
Ruff....
tmenguy May 5, 2024
78dcd95
Ruff....
tmenguy May 6, 2024
c04947b
Ruff.... then black funny game
tmenguy May 6, 2024
54718f6
black.... then ruff funny game
tmenguy May 6, 2024
52bf849
black and ruff game
tmenguy May 6, 2024
72796c6
black and ruff game
tmenguy May 6, 2024
051005f
YABT .. yet another Black Test
tmenguy May 6, 2024
4fe2987
Cleaned supported homes with a way simpler approach, thx @cgtobi
tmenguy May 31, 2024
8d6a9bc
keep black API
tmenguy May 31, 2024
ec038ba
keep black API
tmenguy May 31, 2024
415fcf7
Added back a list of available homes to be able to select the one nee…
tmenguy Jun 4, 2024
bae3959
white space
tmenguy Jun 4, 2024
61a85d2
Merge remote-tracking branch 'refs/remotes/upstream/development' into…
tmenguy Jul 3, 2024
d4bb6e4
Merge remote-tracking branch 'refs/remotes/upstream/development' into…
tmenguy Jul 4, 2024
55761eb
Support NLE "connected ecocometer" that is a bridge
tmenguy Jul 4, 2024
33fc145
Support NLE "connected ecocometer" that is a bridge...and has no pow…
tmenguy Jul 23, 2024
8ed5bac
Support NLE "connected ecocometer" that is a bridge...and has no pow…
tmenguy Jul 23, 2024
d544802
Support NLE "connected ecocometer" that is a bridge...and has no pow…
tmenguy Jul 23, 2024
c057ff2
Black / Rust
tmenguy Jul 23, 2024
16af56a
Black / Rust
tmenguy Jul 23, 2024
9409e6b
Black / Rust
tmenguy Jul 23, 2024
b476257
Remove schedule code API calls, etc ... to make it compatible with ol…
tmenguy Jul 24, 2024
2bfdb12
Remove schedule code API calls, etc ... to make it compatible with ol…
tmenguy Jul 24, 2024
d791f75
Remove schedule code API calls, etc ... to make it compatible with ol…
tmenguy Jul 24, 2024
6ec554e
Remove schedule code API calls, etc ... to make it compatible with ol…
tmenguy Jul 24, 2024
aa1240f
Black / Rust
tmenguy Jul 24, 2024
9be36e2
Black / Rust
tmenguy Jul 24, 2024
ea5dd4e
Black / Rust
tmenguy Jul 24, 2024
c8bca7d
Black / Rust
tmenguy Jul 24, 2024
4d204c9
Black / Rust
tmenguy Jul 24, 2024
d80c562
Black / Ruff
tmenguy Jul 24, 2024
ad7c58e
Black / Ruff
tmenguy Jul 25, 2024
0673532
some first remarks from PR fixes
tmenguy Aug 16, 2024
ae6b4fc
removed home update boolean as output, and raise conditionally a reac…
tmenguy Aug 16, 2024
06bc34c
removed home update boolean as output, and raise conditionally a reac…
tmenguy Aug 16, 2024
542f9b9
rieman energy method extraction
tmenguy Aug 16, 2024
c608134
last PR comments
tmenguy Aug 17, 2024
ba590c6
black / ruff
tmenguy Aug 18, 2024
79ce301
Merge branch 'jabesq-org:development' into development
tmenguy Aug 18, 2024
5de319a
Merge branch 'jabesq-org:development' into development
tmenguy Aug 18, 2024
6f5c8bb
Merge branch 'jabesq-org:development' into development
tmenguy Aug 28, 2024
2da7edc
better error handling
tmenguy Sep 10, 2024
dbb3e4b
Merge remote-tracking branch 'origin/development' into development
tmenguy Sep 10, 2024
b89b07b
Merge branch 'jabesq-org:development' into development
tmenguy Sep 26, 2024
e42f543
add a comment
tmenguy Sep 26, 2024
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
2 changes: 2 additions & 0 deletions src/pyatmo/home.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ async def update(
self.rooms[room["id"]].update(room)

for person_status in data.get("persons", []):
# if there is a person update, it means the house has been updated
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (performance): Consider optimizing the has_an_update flag assignment

The current implementation sets has_an_update = True for each person update. Consider moving this assignment before the loop for efficiency. Also, review if all person updates truly imply a house update, and ensure the flag is being used effectively in the broader context.

has_an_update = bool(data.get("persons"))
for person_status in data.get("persons", []):
    if person := self.persons.get(person_status["id"]):

has_an_update = True
if person := self.persons.get(person_status["id"]):
person.update(person_status)

Expand Down