Skip to main content

Home Assistant WebSocket wrapper

The purpose of this module is to allow to execute synchronous calls to Home Assistant WebSocket API.

It is based on Home Assistant WebSocket API.

It uses synchronouse calls and short-lived connections. Which means each call will open a new connection, execute the call and close the connection. this is way simple and fast in development, but not very efficient in terms of performance. However, it is good enough for most of the cases especially scripting the HomeAssistant.

Usage

You can either use it with AppDaemon or without.

With AppDaemon the token and server information will be configured automatically:

from HassWS import HassWS


class appdaemon_app(hass.Hass):
    hws: HassWS

    def initialize(self):
        self.hws = HassWS(hass_instance=self)
        self.log(self.hws.send('config/entity_registry/list'))

Or without AppDaemon:

from HassWS import HassWS

hws = HassWS(server_url='wss://my.hass.url:8123',token='token goes here')
print(hws.send('config/entity_registry/list'))

Metadata

Release files for HassWS 0.0.3

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

Source distribution (sdist)

Source distribution for HassWS 0.0.3
File Size Uploaded Provenance Actions
HassWS-0.0.3.tar.gz 2.9 kB Without provenance Details for HassWS-0.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 4.7 kB

Release files / HassWS-0.0.3.tar.gz

Download URL HassWS-0.0.3.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
08094221abb9ee6994247eee42d9c9c03df114b888662c8968c8fd20beec6d6b
BLAKE2b-256 checksum
How to use checksums
8c437fbccd7c7395e6ffdcbead244b56cf06df8987d2c4b8fbce5aba391c7dd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Release files / HassWS-0.0.3-py3-none-any.whl

Download URL HassWS-0.0.3-py3-none-any.whl
Size 1.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
069b645f91b133b8b2c62bbbac4a77c9919423ff45d1e8ba5111547681681103
BLAKE2b-256 checksum
How to use checksums
3f890a1accf1010b2e348f66e35cb9639c33ef180a5513af4c91f1c0632a00a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.3

Security for HassWS 0.0.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files No provenance

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