Created
November 11, 2020 09:52
-
-
Save bessarabov/a725e5b02900e1fe2d8d7e67e79fd7e9 to your computer and use it in GitHub Desktop.
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
input_boolean: | |
alarm: | |
input_datetime: | |
alarm: | |
has_date: false | |
has_time: true | |
automation: | |
- alias: set alarm | |
trigger: | |
platform: state | |
entity_id: input_datetime.alarm | |
action: | |
- service: input_boolean.turn_on | |
entity_id: input_boolean.alarm | |
- alias: run alarm | |
trigger: | |
platform: template | |
value_template: "{{ states('sensor.time') == states('input_datetime.alarm')[:5] }}" | |
condition: | |
- condition: state | |
entity_id: input_boolean.alarm | |
state: 'on' | |
action: | |
- service: light.turn_on | |
data: | |
entity_id: light.0x086bd7fffe03d84e_light | |
brightness: 255 | |
transition: 600 | |
- service: input_boolean.turn_off | |
entity_id: input_boolean.alarm |
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
- title: alarm | |
path: alarm | |
icon: 'mdi:clock-time-seven-outline' | |
badges: [] | |
cards: | |
- type: entities | |
show_header_toggle: false | |
entities: | |
- entity: sensor.time | |
- entity: input_boolean.alarm | |
- entity: input_datetime.alarm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment