Skip to content

Commit

Permalink
Energy support, NLE support (#503)
Browse files Browse the repository at this point in the history
* Release v8.0.3 (#488)

* Update BNCS

* feat: add centralized ventilation controller NLLF

---------

Signed-off-by: Tobias Sauerwein <cgtobi@gmail.com>

* Initial commit for support of all schedule types, and fix for historical energy data

* Corrected devices to use hstoryMixin to get energy

* Merged historyMixin and Energy has they are effectively doing the sum, introduces a sum energy and an helper to be used in homeassistant primarily

* removed the daily update

* added a reset measures method to be used directly by external libreries

* reset now resets timings too

* Try to get a proper historical data in case of peak / off_peak energy mode, add some tests

* Fixed correctly the timing end/start of measures

* Fixed correctly the timing end/start of measures

* Fixed correctly the timing end/start of measures

* support correct empty measures

* removed specidif energy exception to use th egeneric API error, 0lus some logging

* removed specidif energy exception to use th egeneric API error, 0lus some logging

* removed specidif energy exception to use th egeneric API error, 0lus some logging

* removed specidif energy exception to use th egeneric API error, 0lus some logging

* async update for all homes

* async update for all homes

* async update for all homes

* async update for all homes

* async update for all homes

* async update for all homes

* async update for all homes

* async update for all homes

* async update for all homes

* added some tests for historical data

* added some tests for historical data

* added a way to get the data sum

* added throttling exception

* fix for num calls estimation

* fix for num calls estimation

* changed type for energy

* changed type for energy

* Added historical retrival for other state, begining only for power (to be used to refine homeassistant energy handling

* Added historical retrival for other state, begining only for power (to be used to refine homeassistant energy handling

* Added historical retrival for other state, begining only for power (to be used to refine homeassistant energy handling

* Added historical retrival for other state, begining only for power (to be used to refine homeassistant energy handling

* Added historical retrival for other state, begining only for power (to be used to refine homeassistant energy handling

* Added historical retrival for other state, begining only for power (to be used to refine homeassistant energy handling

* Added historical retrival for other state, begining only for power (to be used to refine homeassistant energy handling

* Added historical retrival for other state, begining only for power (to be used to refine homeassistant energy handling

* all tests pass

* added energy sum

* added energy sum

* added energy sum

* added energy sum

* PEP cleaning to prepare PR

* adjusting estimation calculus

* adjusting estimation calculus

* adjusting estimation calculus

* slight refactor for readability

* Support error for unreachable home and bridges ....it is an error, not a normal call

* Support error for unreachable home and bridges ....it is an error, not a normal call

* remove global energy sum support, no needed anymore, was adding complexity

* remove global energy sum support, no needed anymore, was adding complexity

* refactor to use self.homes where it should be

* setting schedules list back as the global list of schedules, for retro-compatibility

* Black....

* Ruff....

* Ruff....

* Ruff....

* Ruff.... then black funny game

* black.... then ruff funny game

* black and ruff game

* black and ruff game

* YABT .. yet another Black Test

* Cleaned supported homes with a way simpler approach, thx @cgtobi

* keep black API

* keep black API

* Added back a list of available homes to be able to select the one needed or not

* white space

* Merge remote-tracking branch 'refs/remotes/upstream/development' into development

# Conflicts:
#	src/pyatmo/modules/bticino.py

* Support NLE "connected ecocometer" that is a bridge

* Support NLE "connected ecocometer" that is  a bridge...and has no power data in teh homestatus API

* Support NLE "connected ecocometer" that is  a bridge...and has no power data in teh homestatus API

* Support NLE "connected ecocometer" that is  a bridge...and has no power data in teh homestatus API

* Black / Rust

* Black / Rust

* Black / Rust

* Remove schedule code API calls, etc ... to make it compatible with old lib

* Remove schedule code API calls, etc ... to make it compatible with old lib

* Remove schedule code API calls, etc ... to make it compatible with old lib

* Remove schedule code API calls, etc ... to make it compatible with old lib

* Black / Rust

* Black / Rust

* Black / Rust

* Black / Rust

* Black / Rust

* Black / Ruff

* Black / Ruff

* some first remarks from PR fixes

* removed home update boolean as output, and raise conditionally a reachability error

* removed home update boolean as output, and raise conditionally a reachability error

* rieman energy method extraction

* last PR comments

* black / ruff

---------

Signed-off-by: Tobias Sauerwein <cgtobi@gmail.com>
Co-authored-by: Tobias Sauerwein <cgtobi@users.noreply.github.com>
  • Loading branch information
tmenguy and cgtobi authored Aug 18, 2024
1 parent 3882f23 commit 4de6835
Show file tree
Hide file tree
Showing 20 changed files with 7,990 additions and 631 deletions.
517 changes: 0 additions & 517 deletions fixtures/getmeasure_12_34_56_00_00_a1_4c_da.json

This file was deleted.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
{
"body": [
{
"beg_time": 1721772900,
"step_time": 1800,
"value": [
[
null,
20,
null,
null
],
[
null,
19,
null,
null
],
[
null,
16,
null,
null
],
[
null,
11,
null,
null
],
[
null,
18,
null,
null
],
[
null,
14,
null,
null
],
[
null,
14,
null,
null
],
[
null,
64,
null,
null
],
[
null,
100,
null,
null
],
[
null,
58,
null,
null
],
[
null,
39,
null,
null
],
[
null,
24,
null,
null
],
[
null,
19,
null,
null
],
[
null,
19,
null,
null
],
[
null,
712,
null,
null
],
[
null,
724,
null,
null
],
[
null,
711,
null,
null
],
[
null,
498,
212,
null
],
[
null,
null,
717,
null
],
[
null,
null,
714,
null
],
[
null,
null,
714,
null
],
[
null,
null,
711,
null
],
[
null,
null,
706,
null
],
[
null,
null,
704,
null
],
[
null,
null,
706,
null
],
[
null,
null,
709,
null
],
[
null,
null,
714,
null
],
[
null,
null,
712,
null
],
[
null,
null,
238,
477
],
[
null,
null,
null,
714
],
[
null,
null,
null,
722
],
[
null,
null,
null,
713
],
[
null,
null,
null,
709
],
[
null,
null,
null,
714
],
[
null,
null,
477,
241
],
[
null,
null,
710,
null
],
[
null,
null,
710,
null
],
[
null,
null,
707,
null
],
[
null,
null,
16,
null
]
]
}
],
"status": "ok",
"time_exec": 0.025647878646850586,
"time_server": 1721852913
}
15 changes: 15 additions & 0 deletions fixtures/home_multi_status_error_disconnected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"status":"ok",
"body":{
"errors":[
{
"code":6,
"id":"aa:aa:aa:aa:aa:aa"
}
],
"home":{
"id":"aaaaaaaaaaabbbbbbbbbbccc"
}
},
"time_server":1559292039
}
Loading

0 comments on commit 4de6835

Please sign in to comment.