Skip to content

Instantly share code, notes, and snippets.

@sti0
sti0 / zStackAdapter.ts
Created February 16, 2020 11:12
5 attempts, 2000ms wait
import {
NetworkOptions, SerialPortOptions, Coordinator, CoordinatorVersion, NodeDescriptor,
DeviceType, ActiveEndpoints, SimpleDescriptor, LQI, RoutingTable, Backup as BackupType, NetworkParameters,
StartResult, LQINeighbor, RoutingTableEntry,
} from '../../tstype';
import {ZnpVersion} from './tstype';
import * as Events from '../../events';
import Adapter from '../../adapter';
import {Znp, ZpiObject} from '../znp';
import StartZnp from './startZnp';
@sti0
sti0 / jsonrest.py
Last active March 10, 2022 12:39
Modified version of the jsonrest custom component by mad_ady. This version solves the 255 char state limit problem on homeassistant > 0.56.2. https://community.home-assistant.io/t/solved-parsing-a-json-value-from-an-existing-entity-in-a-template-sensor/20490/17
"""
Support for RESTful API sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.rest/
Modified to parse a JSON reply and store data as attributes
"""
import logging