Skip to content

Instantly share code, notes, and snippets.

View tonyroberts's full-sized avatar

Tony Roberts tonyroberts

View GitHub Profile
@xl_func("str: rtd")
def subscribe(topic):
"""Get a value that has been published on another sheet"""
return SubscriberRTD(topic)
//
// Having multiple Python environments in a single process is a problem.
// The code in this gist is not a complete solution but contains some
// ideas of how the problem might be worked around.
//
// Python extension modules link against python3.dll which redirects
// to the full python3x.dll module, but if multiple Python runtimes
// are loaded then when loading an extension module the python3.dll
// dependency resolves to the first instance of python3.dll that was
// loaded, which may not be the correct one.
#
# Blueprint to control a light (or lights) using a Philips Hue SML001
# motion sensor connected to Home Assistant via ZHA
#
# Home Assitant configures the sensor to be an Occupancy Sensor at boot,
# setting the Occupied to Unoccipied time and sensitivity of the sensor.
# I used to use HA timers to do this, but Blueprint is now much more simple :-)
#
# Additionally the sensor can be disabled using a oneof two entities.
# I usually link this to a TV state, as I do not want my lights going on & off