esphome-ts
TypeScript icon, indicating that this package has built-in type declarations

3.3.1 • Public • Published

esphome-ts

This is a client library for use with esphome.

Example use

import { EspDevice, SwitchComponent } from 'esphome-ts/dist';
import { filter, tap } from 'rxjs/operators';

const device = new EspDevice('my_esp.local');
device.discovery$
    .pipe(
        filter((value) => value),
        tap(() => {
            const sw = device.components['test_switch'] as SwitchComponent;
            sw.state$.subscribe((value) => {
                console.log(sw.status);
            });
        }),
    )
    .subscribe();

Please see more here

Contribution

Please, feel free to make a PR and contribute to this project. Esphome is a good project, and this expands their ecosystem.

License

While this project in general and my contributions (Luca Becker) are licensed under the GPLv3, the .proto files are licensed under different licenses. Please see those files for their respective licenses. Copies of their licenses have been saved in the licenses folder.

/esphome-ts/

    Package Sidebar

    Install

    npm i esphome-ts

    Weekly Downloads

    14

    Version

    3.3.1

    License

    GPL-3.0

    Unpacked Size

    579 kB

    Total Files

    61

    Last publish

    Collaborators

    • lucabecker