This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Turn on light, switch, scene, script or group based on motion and illuminance, extra blocker. | |
description: > | |
Turn on a light, switch, scene, script or group based on motion detection, and low light level. | |
This blueprint uses helper entities you have to create yourself for some input values, to be able to dynamically set limits. | |
For instructions on creating the helper entities take a look in the Home Assistant Community forum topic: | |
https://community.home-assistant.io/t/turn-on-light-switch-scene-or-script-based-on-motion-and-illuminance-more-conditions/257085 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
#-*- coding: utf-8 -*- | |
import json | |
import httplib2 | |
from datetime import datetime | |
from apiclient.discovery import build | |
from oauth2client.client import OAuth2WebServerFlow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import networkx as nx | |
import graph_tool as gt | |
def get_prop_type(value, key=None): | |
""" | |
Performs typing and value conversion for the graph_tool PropertyMap class. | |
If a key is provided, it also ensures the key is in a format that can be | |
used with the PropertyMap. Returns a tuple, (type name, value, key) | |
""" |