Skip to content

Instantly share code, notes, and snippets.

@JohNan
JohNan / motion-brightness.yaml
Last active January 17, 2022 19:55
Motion-activated light with brightness level
blueprint:
name: Motion-activated Light with brightness level
description: Turn on a light when motion is detected with a certain brightness level
domain: automation
input:
motion_entity:
name: Motion Sensor
selector:
entity:
domain: binary_sensor

Keybase proof

I hereby claim:

  • I am johnan on github.
  • I am johnen (https://keybase.io/johnen) on keybase.
  • I have a public key ASDIjMkCdneOou9Qb3NxbAvyY3gOZTA14VIMZEn_mjOTvQo

To claim this, I am signing this object:

@JohNan
JohNan / QuickReturnRecyclerView.java
Created November 12, 2014 15:38
A simple RecyclerView where a Quick Return view can be added either at the top or the bottom. Inspired by https://github.com/LarsWerkman/QuickReturnListView
import android.content.Context;
import android.os.Build;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.Gravity;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.TranslateAnimation;
import android.widget.FrameLayout;