Skip to content

Instantly share code, notes, and snippets.

View JoshBello's full-sized avatar
🙃
Debugging

Josh Bello JoshBello

🙃
Debugging
View GitHub Profile
blueprint:
name: Motion-Activated Light (Night Only)
description: Turn on a light when motion is detected, but only between sunset and sunrise.
domain: automation
input:
motion_sensor:
name: Motion Sensor
description: The motion sensor that triggers the automation
selector:
entity:
blueprint:
name: Two Light Sync (Optimized v3)
description: >
Bidirectional sync of on/off state and brightness between two lights.
• Context-based loop detection (no echo triggers)
• Compares from_state vs to_state for actual changes only
• Single service call per change (50% fewer Zigbee commands)
• `mode: restart` for smooth rapid dimming
• Configurable brightness tolerance and debounce
• Graceful handling of *unavailable* state
0x7DaC0f95550a984151662C9b7Cf1E43731ea222d
backup