Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

powerplanner-lib-0.0.15.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

powerplanner_lib-0.0.15-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

Details for the file powerplanner-lib-0.0.15.tar.gz.

File metadata

  • Download URL: powerplanner-lib-0.0.15.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for powerplanner-lib-0.0.15.tar.gz
Algorithm Hash digest
SHA256 628dd8fe1675946392bb327a86ba5ecdb1d8e5fc1061046bb3473191bd6269e2
MD5 30ca82ef4eaac62596fb5e66001fa090
BLAKE2b-256 aa7a649de59c6c159b96e026241c6a590d55e4637d09105d4a94b41ba7a94b78

See more details on using hashes here.

File details

Details for the file powerplanner_lib-0.0.15-py3-none-any.whl.

File metadata

File hashes

Hashes for powerplanner_lib-0.0.15-py3-none-any.whl
Algorithm Hash digest
SHA256 0679d7cabb96c310bc58b270019696222bd29ddd7ca7f51d5e512db1882bcbf9
MD5 9fcc18c618f0cf1567097e2d5f2699ab
BLAKE2b-256 bb70956268fe6dcdfe3f314f1c44f05eaa1805b83198b54e395797441399cc35

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page