Skip to content

Instantly share code, notes, and snippets.

@SimonDanisch
Last active March 16, 2026 17:54
Show Gist options
  • Select an option

  • Save SimonDanisch/c2f634e439cb553bf9a90399a4e56a85 to your computer and use it in GitHub Desktop.

Select an option

Save SimonDanisch/c2f634e439cb553bf9a90399a4e56a85 to your computer and use it in GitHub Desktop.
blueprint:
name: Flur Licht Occupancy mit Helligkeit
description: Licht an wenn Bewegung erkannt und es dunkel ist, aus wenn keine Bewegung
domain: automation
input:
occupancy_sensor:
name: Occupancy Sensor
selector:
entity:
domain: binary_sensor
device_class: occupancy
illumination_sensor:
name: Illumination Sensor
selector:
entity:
domain: sensor
light:
name: Lampe
selector:
entity:
domain: light
mode: single
max_exceeded: silent
trigger:
- platform: state
entity_id: !input occupancy_sensor
action:
- choose:
- conditions:
- condition: state
entity_id: !input occupancy_sensor
state: "on"
- condition: state
entity_id: !input illumination_sensor
state: "dim"
sequence:
- action: light.turn_on
target:
entity_id: !input light
- conditions:
- condition: state
entity_id: !input occupancy_sensor
state: "off"
sequence:
- action: light.turn_off
target:
entity_id: !input light
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment