Last active
August 23, 2025 19:56
-
-
Save SirEdvin/323748d24743be988254eead77c8c79c to your computer and use it in GitHub Desktop.
Smart light without switch
This file contains hidden or 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: Smart Light Control without Switch | |
description: > | |
Control lights with a smart switch button. First press turns on the switch, | |
subsequent presses toggle lights with different brightness and color temperature | |
based on light mode (Day/Night). | |
domain: automation | |
input: | |
target_light: | |
name: Target Light | |
description: The light entity to control | |
selector: | |
entity: | |
filter: | |
- domain: light | |
day_color_temp: | |
name: Day Mode Color Temperature | |
description: Color temperature for day mode (in mireds) | |
default: 280 | |
selector: | |
number: | |
min: 153 | |
max: 500 | |
step: 1 | |
day_brightness: | |
name: Day Mode Brightness | |
description: Brightness percentage for day mode | |
default: 100 | |
selector: | |
number: | |
min: 1 | |
max: 100 | |
step: 1 | |
night_color_temp: | |
name: Night Mode Color Temperature | |
description: Color temperature for night mode (in mireds) | |
default: 380 | |
selector: | |
number: | |
min: 153 | |
max: 500 | |
step: 1 | |
night_brightness: | |
name: Night Mode Brightness | |
description: Brightness percentage for night mode | |
default: 30 | |
selector: | |
number: | |
min: 1 | |
max: 100 | |
step: 1 | |
extra_triggers: | |
name: Extra triggers for light | |
default: [] | |
selector: | |
trigger: | |
extra_conditions: | |
name: Extra conditions | |
default: [] | |
selector: | |
condition: | |
trigger: | |
- triggers: !input extra_triggers | |
condition: !input extra_conditions | |
action: | |
- if: | |
- condition: state | |
entity_id: !input target_light | |
state: "on" | |
then: | |
- service: light.turn_off | |
target: | |
entity_id: !input target_light | |
else: | |
- if: | |
- condition: state | |
entity_id: input_select.light_mode | |
state: Night | |
then: | |
- service: light.turn_on | |
target: | |
entity_id: !input target_light | |
data: | |
color_temp: !input night_color_temp | |
brightness_pct: !input night_brightness | |
else: | |
- service: light.turn_on | |
target: | |
entity_id: !input target_light | |
data: | |
color_temp: !input day_color_temp | |
brightness_pct: !input day_brightness | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment