Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions source/_integrations/light.template.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ light:
level_template: "{{ state_attr('sensor.theater_brightness', 'lux')|int }}"
value_template: "{{ state_attr('sensor.theater_brightness', 'lux')|int > 0 }}"
temperature_template: "{{states('input_number.temperature_input') | int}}"
color_template: "({{states('input_number.h_input') | int}}, {{states('input_number.s_input') | int}})"
turn_on:
service: script.theater_lights_on
turn_off:
Expand All @@ -41,6 +42,15 @@ light:
data_template:
value: "{{ color_temp }}"
entity_id: input_number.temperature_input
set_color:
- service: input_number.set_value
data_template:
value: "{{ h }}"
entity_id: input_number.h_input
- service: input_number.set_value
data_template:
value: "{{ s }}"
entity_id: input_number.s_input
```

{% endraw %}
Expand Down Expand Up @@ -74,6 +84,11 @@ light:
required: false
type: template
default: optimistic
color_template:
description: Defines a template to get the color of the light. Must render a tuple (hue, saturation)
required: false
type: template
default: optimistic
icon_template:
description: Defines a template for an icon or picture, e.g. showing a different icon for different states.
required: false
Expand All @@ -99,6 +114,10 @@ light:
description: Defines an action to run when the light is given a color temperature command.
required: false
type: action
set_color:
description: Defines an action to run when the light is given a color command.
required: false
type: action
{% endconfiguration %}

## Considerations
Expand Down