Skip to content

Instantly share code, notes, and snippets.

View k1asa's full-sized avatar

k1asa

  • Kanagawa
View GitHub Profile
@k1asa
k1asa / jsonrest.py
Created July 6, 2018 05:38 — forked from sti0/jsonrest.py
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