From db0e50fc6149e3fc74cab0475e378640750ef550 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Thu, 6 Jun 2024 06:31:15 +0400 Subject: A script to set office lights to the pre-defined temperature --- custom/scripts/turn-on-office-lights.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 custom/scripts/turn-on-office-lights.yaml (limited to 'custom') diff --git a/custom/scripts/turn-on-office-lights.yaml b/custom/scripts/turn-on-office-lights.yaml new file mode 100644 index 0000000..f9615a0 --- /dev/null +++ b/custom/scripts/turn-on-office-lights.yaml @@ -0,0 +1,30 @@ +turn_on_office_lights: + alias: Turn On Office Lights + description: Turn on office bulb & turn off upper lights + fields: + temperature: + name: Temperature + description: "Temperature (Kelvin)" + default: 4500 + selector: + number: + min: 2000 + max: 6500 + + variables: + temp: "{{ temperature | default(4500) | float }}" + + mode: single + + sequence: + - parallel: + - service: light.turn_on + data: + brightness_pct: 100 + kelvin: "{{ temp }}" + target: + entity_id: light.yeelight_color_0x7caaf86 + - service: homeassistant.turn_off + data: {} + target: + entity_id: switch.lights_living_lustre -- cgit v1.2.3