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.1

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.1
File Size Uploaded Provenance Actions
pysmartyplants-0.2.1.tar.gz 13.2 kB With provenance Details for pysmartyplants-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 23.1 kB

Release files / pysmartyplants-0.2.1.tar.gz

Download URL pysmartyplants-0.2.1.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d9b8b78bf59063c05fbd1b579815d7343857bbf8d182793ba86358fc3b0665b1
BLAKE2b-256 checksum
How to use checksums
c246d97bc5e7d04d4dbd2702d45c88109c2da5bb5c718924d737f01fcea83a44
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 Sep 7, 2026.

Transparency log

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

Download URL pysmartyplants-0.2.1-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb09c305248b9f033e4e9d330275fb0878a20033700a6f6510f39b3588c1e7c2
BLAKE2b-256 checksum
How to use checksums
3a89851e063fa9f9056b6d1ca705fca82c1b10098639b80e6897342c42f61ea9
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 Sep 7, 2026.

Transparency log

Security for pysmartyplants 0.2.1

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.1.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 Sep 7, 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