Skip to main content

pysmartyplants

Async client for the SmartyPlants integration API, used by the Home Assistant SmartyPlants integration.

Install

pip install pysmartyplants

Use

import asyncio
from pysmartyplants import SmartyPlantsClient


async def main() -> None:
    async with SmartyPlantsClient("sp_your_api_key") as client:
        for sensor in await client.async_get_sensors():
            print(sensor.name, sensor.readings.moisture.value if sensor.readings else None)

        for plant in await client.async_get_plants():
            print(plant.name, plant.environment)


asyncio.run(main())

Responses are parsed into frozen dataclasses — Sensor, PlantDetail, Readings, Health, Account — so fields have known types and a malformed value is dropped at the boundary rather than surfacing later. SensorUpdate parses a webhook body, and Sensor.merge() applies one to a polled sensor, keeping any field the push left out.

Pass session= to reuse an existing aiohttp.ClientSession; the client then leaves its lifecycle to you, which is how Home Assistant uses it.

Errors are raised as SmartyPlantsAuthError (key rejected) or SmartyPlantsConnectionError (unreachable, non-JSON, or malformed response), both subclasses of SmartyPlantsError.

Metadata

Release files for pysmartyplants 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysmartyplants 0.2.0
File Size Uploaded Provenance Actions
pysmartyplants-0.2.0.tar.gz 12.4 kB With provenance Details for pysmartyplants-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pysmartyplants 0.2.0
File Interpreter ABI Platform Actions
pysmartyplants-0.2.0-py3-none-any.whl Python 3 none any Details for pysmartyplants-0.2.0-py3-none-any.whl

Total release size: 21.9 kB

Release files / pysmartyplants-0.2.0.tar.gz

Download URL pysmartyplants-0.2.0.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f75d7790c156c608bbaa2d509656986f651236558f8c90d60ac87854b8515176
BLAKE2b-256 checksum
How to use checksums
76fbef600050ca92c5881cb73af1361c7b7a65ee12d85efbb6071a56e72ef58c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Release files / pysmartyplants-0.2.0-py3-none-any.whl

Download URL pysmartyplants-0.2.0-py3-none-any.whl
Size 9.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4bef207bca703ed761647749293645f9ad620f3fc18cf2515ff75c3a1bf1ec2
BLAKE2b-256 checksum
How to use checksums
21cd727815efce4193671d20f923e625a2b49f9414bd75b27db2932337d8e2bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

Security for pysmartyplants 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pysmartyplants-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page