Skip to content

Instantly share code, notes, and snippets.

@Dan1jel
Created January 18, 2025 09:49
Show Gist options
  • Save Dan1jel/7f5858f06b8a0162d0aae58c3fd4e4ab to your computer and use it in GitHub Desktop.
Save Dan1jel/7f5858f06b8a0162d0aae58c3fd4e4ab to your computer and use it in GitHub Desktop.
alias: LED E14 - red/green (weekdays)
description: ""
triggers:
- trigger: time
at: "19:00:00"
- trigger: time
at: "06:00:00"
conditions: []
actions:
- alias: Night lamp
if:
- condition: time
after: "19:00:00"
before: "06:00:00"
weekday:
- mon
- fri
- thu
- wed
- tue
enabled: true
then:
- alias: "On"
action: light.turn_on
metadata: {}
data: {}
target:
entity_id:
- light.natt_led_lampa
- delay:
hours: 0
minutes: 0
seconds: 1
- alias: Red + 1%
action: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 1
target:
entity_id: light.natt_led_lampa
else:
- alias: "On"
action: light.turn_on
metadata: {}
data: {}
target:
entity_id:
- light.natt_led_lampa
- delay:
hours: 0
minutes: 0
seconds: 1
- alias: Green + 1%
action: light.turn_on
metadata: {}
data:
rgb_color:
- 16
- 255
- 0
brightness_pct: 1
target:
entity_id:
- light.natt_led_lampa
- delay:
hours: 0
minutes: 0
seconds: 1
- alias: Bedroom
if:
- condition: time
after: "19:00:00"
before: "06:00:00"
weekday:
- mon
- fri
- thu
- wed
- tue
enabled: true
then:
- alias: "On"
action: light.turn_on
metadata: {}
data: {}
target:
entity_id:
- light.ewelink_ck_bl702_al_01_7009_z102lg03_1_lampa
- delay:
hours: 0
minutes: 0
seconds: 1
- alias: Red + 1%
action: light.turn_on
metadata: {}
data:
rgb_color:
- 255
- 0
- 0
brightness_pct: 1
target:
entity_id: light.ewelink_ck_bl702_al_01_7009_z102lg03_1_lampa
else:
- alias: "On"
action: light.turn_on
metadata: {}
data: {}
target:
entity_id:
- light.ewelink_ck_bl702_al_01_7009_z102lg03_1_lampa
- delay:
hours: 0
minutes: 0
seconds: 1
- alias: Green + 1%
action: light.turn_on
metadata: {}
data:
rgb_color:
- 16
- 255
- 0
brightness_pct: 1
target:
entity_id:
- light.ewelink_ck_bl702_al_01_7009_z102lg03_1_lampa
mode: single
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment