summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2024-06-06 06:31:15 +0400
committerSuren A. Chilingaryan <csa@suren.me>2024-06-06 06:31:15 +0400
commitdb0e50fc6149e3fc74cab0475e378640750ef550 (patch)
tree43583c8ca646b831195880fca3d520ab3b204a6c
parent4d0a5490042fdddcf5759e523682c1a02af2c3f1 (diff)
downloadhass-db0e50fc6149e3fc74cab0475e378640750ef550.tar.gz
hass-db0e50fc6149e3fc74cab0475e378640750ef550.tar.bz2
hass-db0e50fc6149e3fc74cab0475e378640750ef550.tar.xz
hass-db0e50fc6149e3fc74cab0475e378640750ef550.zip
A script to set office lights to the pre-defined temperature
-rw-r--r--custom/scripts/turn-on-office-lights.yaml30
1 files changed, 30 insertions, 0 deletions
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