Skip to content

Instantly share code, notes, and snippets.

blueprint:
name: Motion-activated light scene with surrounding light level check and optional ambient scene
description: Turn on a light scene when motion is detected. Three different scenes can be defined depending on time of day. Furthermore a source for checking sourrounding light can be defined to enable light only if it is dark enough.
domain: automation
source_url: https://gist.github.com/incapable/f43f74a0c5f9554b86f31ad0c0584180
input:
motion_entity:
name: Motion Sensor
selector:
entity:
blueprint:
name: Sleep Timer
description: Perform one or more actions after a sleep timer expires
domain: automation
input:
input_number:
name: Input Number
description: The input number that determines how many minutes
the sleep timer should last for
blueprint:
name: Sleep Timer
description: Perform one or more actions after a sleep timer expires
domain: automation
input:
input_number:
name: Input Number
description: The input number that determines how many minutes
the sleep timer should last for
blueprint:
name: Sleep Timer
description: Perform one or more actions after a sleep timer expires
domain: automation
input:
input_number:
name: Input Number
description: The input number that determines how many minutes
the sleep timer should last for
blueprint:
name: Sleep Timer
description: Perform one or more actions after a sleep timer expires
domain: automation
input:
input_number:
name: Input Number
description: The input number that determines how many minutes
the sleep timer should last for
blueprint:
name: Sleep Timer
description: Perform one or more actions after a sleep timer expires
domain: automation
input:
input_number:
name: Input Number
description: The input number that determines how many minutes
the sleep timer should last for
/**
* Try to find an object, and return that if it exists
* If it does not, create it and return the newly created object
*
* @param lockable Object to acquire locks on for multithreaded purposes
* @param row The row used to construct a new object
* @param collection The collection to search in
* @param id The id to search for
* @param constructor Constructor that is called when a new object needs to be created
* @param <T> The type of the object we're finding/creating
for (TypeElement annotation : annotations) {
for (Element element : roundEnv.getElementsAnnotatedWith(annotation)) {
ValidateFunction elementAnnotation = element.getAnnotation(ValidateFunction.class);
List<ExecutableElement> methods = elements.getTypeElement(elementAnnotation.className())
.getEnclosedElements()
.stream()
.filter(enclosedElement ->
ElementKind.METHOD.equals((enclosedElement).getKind())

Keybase proof

I hereby claim:

  • I am incapable on github.
  • I am incapable (https://keybase.io/incapable) on keybase.
  • I have a public key ASBS-h0XUvjMRG9d7bJJQMG2P0g158QZ_H54TwQrsKoW8Ao

To claim this, I am signing this object: