plex-configs/home_assistant/automations/byte_my_bits_rotary_dial_li.../kelvin_changer.yaml

48 lines
1.3 KiB
YAML
Raw Normal View History

2023-07-26 04:49:53 +00:00
alias: "!Background - Kitchen - Kelvin Changer"
description: ""
trigger:
- platform: state
entity_id:
- input_number.kitchen_rgb_temperature
from: null
to: null
enabled: true
- platform: state
entity_id:
- input_number.kitchen_rgb_mode
from: null
to: null
condition: []
action:
- if:
- condition: template
value_template: "{{ states('input_number.kitchen_rgb_mode') | int == 1 }}"
alias: IF Mode 1 = Kelvin
enabled: true
then:
- if:
- condition: state
entity_id: input_boolean.toggle_kitchen_rgb_top
state: "on"
then:
- service: light.turn_on
data:
kelvin: "{{ states('input_number.kitchen_rgb_temperature') }}"
target:
entity_id: light.kitchen_rgb_top_light
alias: IF Top Toggle ON
- if:
- condition: state
entity_id: input_boolean.toggle_kitchen_rgb_bottom
state: "on"
alias: IF Bottom Toggle ON
then:
- service: light.turn_on
data:
kelvin: "{{ states('input_number.kitchen_rgb_temperature') }}"
target:
entity_id: light.kitchen_rgb_bottom_light
alias: IF Bottom Toggle ON
alias: Do shit
mode: single