Created
July 3, 2023 21:05
-
-
Save allenporter/e5fabc79be8d42d4cbd4970ba9c6af0c to your computer and use it in GitHub Desktop.
Use a calendar to manage an evening light schedule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Evening Light Calendar | |
description: Use a calendar for managing a light schedule. Lights are turned on according the calendar schedule, and only after dark. | |
domain: automation | |
input: | |
calendar_sensor: | |
name: Calendar Sensor | |
selector: | |
entity: | |
domain: | |
- calendar | |
- binary_sensor | |
target_light: | |
name: Light | |
selector: | |
target: | |
entity: | |
domain: light | |
variables: | |
cal_switch: !input calendar_sensor | |
trigger: | |
- platform: state | |
entity_id: !input calendar_sensor | |
- platform: sun | |
event: sunset | |
condition: | |
- after: sunset | |
condition: sun | |
action: | |
service: "{{ iif(is_state(cal_switch, 'on'), 'light.turn_on', 'light.turn_off') }}" | |
target: !input target_light |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment