Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: Advanced motion activated device
description: >
Turn on an entity with a lot of conditional options
It can also trigger on other changes, so if "coming home" is detected with a small delay, and motion is noticed, the lights
will still turn on if you are detected as being home, and there is still motion in the room.
Some condition values have an option for entity-input and numeric input. If you fill both, both will be checked with an OR condtion.
@storeman
storeman / motion_illuminance_activated_entity.yaml
Last active June 17, 2023 20:30 — forked from freakshock88/motion_illuminance_activated_entity.yaml
Home Assistant BluePrint to turn on light, switch, scene or script based on motion and illuminance
blueprint:
name: Turn on light, switch, scene, script or group based on motion and illuminance.
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
@storeman
storeman / php_unserialize_to_json.sql
Last active April 19, 2024 16:49
PHP unserialize in Postgresql to json
/**
Decode a php serialized value to json. This function only supports basic
data types:
- arrays (will always become a json object)
- booleans
- integers
- floats
- strings
- NULL
The php_unserialize(text) function is a helper function which extracts the first value
/*
* script: prompter.js
* @author: Martin Winkel
*
*/
var Prompter = new Class({
Implements:[Options,Events],
options: {
onShow: $empty,
onHide: $empty,
/**
* @author: Martin Winkel [firstnameUnderscoreLastname@hotmail.com]
* @lastupdate: 2009-05-12
*/
MooTools.lang.set('nl-NL', 'Date', {
months: ['januari', 'februari', 'maart', 'april', 'mei', 'juni', 'juli', 'augustus', 'september', 'oktober', 'november', 'december'],
days: ['Zondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrijdag', 'Zaterdag'],
//culture's date order: MM/DD/YYYY
dateOrder: ['date', 'month', 'year'],