Created
December 31, 2021 11:51
-
-
Save jamesridgway/44f4a04243e966fc76fbfe87c57cdf0b 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
alias: Ensuite Lights On | |
description: "" | |
mode: single | |
trigger: | |
- platform: mqtt | |
topic: "shellies/shellyix3-FE9DE4D4101F/input/0" | |
condition: | |
- condition: template | |
value_template: "{{ trigger.payload == '1' }}" | |
- condition: device | |
type: is_off | |
device_id: ef6cf6ec2c2b11600fb6ff99671434f7 | |
entity_id: light.ensuite_window | |
domain: light | |
action: | |
- service: light.turn_on | |
target: | |
entity_id: | |
- light.ensuite_window | |
- light.ensuite_shower | |
data_template: | |
brightness: > | |
{% if now().hour >= 22 %}175 | |
{% elif now().hour < 7 %}175 | |
{% else %}255 | |
{% endif %} | |
color_name: > | |
{% if now().hour >= 22 %}red | |
{% elif now().hour < 7 %}red | |
{% else %}white | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment