Skip to content

Instantly share code, notes, and snippets.

@PatWie
Created May 22, 2021 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PatWie/4009f3f3d2643a31173870211299267e to your computer and use it in GitHub Desktop.
Save PatWie/4009f3f3d2643a31173870211299267e to your computer and use it in GitHub Desktop.
blueprint:
name: Close Blinds At Sunset
description: Blinds will be closed at sunset
domain: automation
input:
target_blind:
name: Blinds
description: This is the blind (or blinds) that will be closed at sunset
selector:
target:
entity:
domain: cover
elevation_shift:
name: Elevation Shift
description:
Using an elevation offset (height of sun relative to the horizon)
to shift the sunset trigger, either earlier or later. Positive values bring
the automation start time forward, whilst negative values delay the start
time. To approximate Golden Hour - set the Elevation Offset to 1.
default: 0.0
selector:
number:
min: -3.0
max: 3.0
mode: slider
step: 1.0
mode: single
variables:
target_blind: !input "target_blind"
trigger:
platform: numeric_state
entity_id: sun.sun
attribute: elevation
below: !input "elevation_shift"
condition:
condition: sun
after: sunrise
after_offset: 01:00:00
action:
- service: cover.close_cover
target: !input "target_blind"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment