Skip to main content

Type annotations for the Homey SDK

Project description

homey-stubs

Type annotations for the Homey SDK

Static type-checkers

These types have been tested with:

A static type-checking package is not required, however, and these stubs will still improve autocomplete suggestions and error detection in your IDE if you don't install one.

Example

The following example illustrates some situations that will be caught by pyright.

from homey.driver import Driver
from homey.flow_card_trigger_device import FlowCardTriggerDevice

class  MyDriver(Driver):
    async def on_init(self) -> None:
        # Type "FlowCardTrigger" is not assignable to declared type "FlowCardTriggerDevice"
        trigger_card: FlowCardTriggerDevice = self.homey.flow.get_trigger_card("something_happens")
        some_token = await self.homey.flow.create_token("some_token", "number", "Some token")
        # Type "Literal['value']" is not assignable to type "float | None"
        await some_token.set_value("value")

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

homey_stubs-0.0.5.0-py3-none-any.whl (52.5 kB view details)

Uploaded Python 3

File details

Details for the file homey_stubs-0.0.5.0-py3-none-any.whl.

File metadata

  • Download URL: homey_stubs-0.0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 52.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for homey_stubs-0.0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4cf85768cd3b9e99a2c8092c1e82b144665cec6a859c698ab481529987e9e2b2
MD5 e89a0a07228e1b5160b0416a432d6d41
BLAKE2b-256 b7fbc5e703837394d9fae3d90c2e9360ae3f7d98eb23b35a18877e0cb2239237

See more details on using hashes here.

Provenance

The following attestation bundles were made for homey_stubs-0.0.5.0-py3-none-any.whl:

Publisher: stubs-publish.yml on athombv/python-homey-apps-sdk-v3

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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