python-google-nest-sdm
This is a library for Google Nest Device Access using the Smart Device Management API.
Usage
This can be used with the sandbox which requires Registration, accepting terms and a fee.
You'll want to following the Get Started guides for setup including steps in the google cloud console. Overall, this is fairly complicated with many steps that are easy to get wrong. It is likely worth it to make sure you can get the API working using their supplied curl commands with your account before attempting to use this library.
Structure
This API was designed for use in Home Assistant following the advice in Building a Python Library for an API.
If you are integrating this from outside Home Assistant, you'll need to create your own oauth integration and token refresh mechanism and tooling.
Fetching Data
This is an example to use the command line tool to access the API:
PROJECT_ID="some-project-id"
CLIENT_ID="some-client-id"
CLIENT_SECRET="some-client-secret"
# Initial call will ask you to authorize OAuth2 then cache the token
google_nest --project_id="${PROJECT_ID}" --client_id="${CLIENT_ID}" --client_secret="${CLIENT_SECRET}" list_structures
# Subsequent calls only need the project id
google_nest --project_id="${PROJECT_ID}" get_device "some-device-id"
google_nest --project_id="${PROJECT_ID}" set_mode COOL
google_nest --project_id="${PROJECT_ID}" set_cool 25.0
Subscriptions
See Device Access: Getting Started: Subscribe to Events for documentation on how to create a pull subscription.
You can create the subscription to use with the tool with these steps:
- Create the topic:
- Visit the Device Access Console
- Select a project
- Enable Pub/Sub and note the full
topicbased on theproject_id
- Create the subscriber:
- Visit Google Cloud Platform: Pub/Sub: Subscriptions
- Create a subscriber
- Enter the
Topic Name - Create a
Subscription Name, e.g. "project-id-python" which is yoursubscriber_id
This is an example to run the command line tool to subscribe:
PROJECT_ID="some-project-id"
SUBSCRIPTION_ID="projects/some-id/subscriptions/enterprise-some-project-id-python-google-nest"
google_nest --project_id="${PROJECT_ID}" subscribe ${SUBSCRIPTION_ID}
Development
$ python3 -m venv venv
$ source venv/bin/activate
$ pip3 install -e .
$ pip3 install -r requirements.txt
# Running tests
$ pytest
# Running tests w/ Code Coverage
$ pytest --cov=google_nest_sdm tests/ --cov-report=term-missing
# Formatting and linting
$ pre-commit run --all-files
Funding and Support
If you are interested in donating money to this effort, instead send a donation to Black Girls Code which is a great organization growing the next generation of software engineers.
Metadata
Release files for google-nest-sdm 9.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| google_nest_sdm-9.2.1.tar.gz | 76.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| google_nest_sdm-9.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 132.7 kB
Release files / google_nest_sdm-9.2.1.tar.gz
| Download URL | google_nest_sdm-9.2.1.tar.gz |
|---|---|
| Size | 76.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26d5e088617603cce23d9ac91a6c110bfa625ac7d609a07f5e851fa55b5f4ac4
|
|
BLAKE2b-256 checksum How to use checksums |
3ff7af6fbd7a29128b941471711ee48cd61c1a55fd5302b8c7561ac2a9dace98
|
| 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 16, 2026.
Transparency logRelease files / google_nest_sdm-9.2.1-py3-none-any.whl
| Download URL | google_nest_sdm-9.2.1-py3-none-any.whl |
|---|---|
| Size | 56.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c9c216e8d4bf458c9890815dcd896646e7e0b2ae312009e69dc2cf0d0222859
|
|
BLAKE2b-256 checksum How to use checksums |
ddfab316214084017aecd91272bcb9d7389a96243d5d3c777d6a20d8a74536f4
|
| 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 16, 2026.
Transparency log