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.12.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: powerplanner-lib-0.0.12.tar.gz
  • Upload date:
  • Size: 4.5 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.12.tar.gz
Algorithm Hash digest
SHA256 316061065753390ca00f39e67d6b6a629c187481e6e825fd626a6d062b3e61bd
MD5 5703abd5794cc6d11c82f0dc629eaad6
BLAKE2b-256 e0df03706303ef300f6f0986ed21d7e3fc10bfe189c4599a06bad7d0c4a500bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for powerplanner_lib-0.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 fce33cbb8486ef6793ce14f4ecbd82e2cd5238a3b6f69fad318cbae35970af9d
MD5 52f00850b682a25e4a0bbbd1c3d27d74
BLAKE2b-256 f5a91bfb835f835d14eac51e6f87dcd1b9023ef626b5b64f706a9e23ad3e0a0c

See more details on using hashes here.

Supported by

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