Client package to access powerplanner API
Project description
PowerPlanner API Lib
Library to support accessing the powerplanner API Mainly used for the Home assistant integration
Create an instance with your api key from powerplanner
update()
Fetches all schedules from the powerplanner API and returns the raw json result
If there is removed or added plans these will be available in the "new_plans" & "old_plans" variable The "plans_changed" variable will also be true.
toggle(plan_id: str, enabled:bool)
Enables or disables a plan and updates the schedules
set_property(plan_id: str, property_key: str, value: any)
Updates a dynamic rule value on a plan
get_next_change(name: str)
returns when a plan will change its enabled status
add_sensor(sensor)
Adds a sensor to the collection and triggers the assigned callback
remove_sensor(sensor_name: str)
Removes a sensor from the collection
time_to_change(name: str)
Returns how many seconds left it is before the plan changes status
is_on(name: str)
Returns the current status for a plan by checking the schedule
authenticate():
Checks if the api key is correct
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file powerplanner-lib-0.0.11.tar.gz
.
File metadata
- Download URL: powerplanner-lib-0.0.11.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 864beaf83aa5c73882a66e9d511393267c73b826d6c8141be35ef12dbc699501 |
|
MD5 | 7fb6783b98645ea2d5df317a04403600 |
|
BLAKE2b-256 | e342d4bca0483f580db2e315d09b573e465565881e4ed42081cd06a1da8bcc9f |
File details
Details for the file powerplanner_lib-0.0.11-py3-none-any.whl
.
File metadata
- Download URL: powerplanner_lib-0.0.11-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66f7138ac930a07e0b39b8b8f8e82b67a00ddf5253b4a47657bc7bf115f33acd |
|
MD5 | 4b1491abf5428ae114ed3c76414f1088 |
|
BLAKE2b-256 | 7f8ba030ea67c3667db0e2f89b104a62acf80fc7dcbc921f0a6a5a578a90d36a |