-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
1,006 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
pypowerwall==0.10.3 | ||
pypowerwall==0.10.4 | ||
bs4==0.0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import functools | ||
import logging | ||
|
||
log = logging.getLogger('pypowerwall.tedapi.pypowerwall_tedapi') | ||
WARNED_ONCE = {} | ||
|
||
|
||
def not_implemented_mock_data(func): | ||
@functools.wraps(func) | ||
def wrapper(*args, **kwargs): | ||
if not WARNED_ONCE.get(func.__name__): | ||
log.warning(f"This API [{func.__name__}] is using mock data in tedapi mode. This message will be " | ||
"printed only once at the warning level.") | ||
WARNED_ONCE[func.__name__] = 1 | ||
else: | ||
log.debug(f"This API [{func.__name__}] is using mock data in tedapi mode.") | ||
return func(*args, **kwargs) | ||
|
||
return wrapper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
class PyPowerwallTEDAPINoTeslaAuthFile(Exception): | ||
pass | ||
|
||
|
||
class PyPowerwallTEDAPITeslaNotConnected(Exception): | ||
pass | ||
|
||
|
||
class PyPowerwallTEDAPINotImplemented(Exception): | ||
pass | ||
|
||
|
||
class PyPowerwallTEDAPIInvalidPayload(Exception): | ||
pass |
Oops, something went wrong.