I have some lights which support both RGB and warm/cool white. Is there a way to et color temperature using voice assistant? When I say “Set floor lamp to white” it does RGB white. If I try “set floor lamp to warm white” it doesn’t understand. I’ve also tried specifying a kelvin number, that’s not recognized either.
This is kind of quick and dirty but it seems to work in limited testing:
alias: Sentence - Area light to Warm White
description: ""
triggers:
- trigger: conversation
command:
- "[set|change] lights [in [the] {area}] to warm white"
conditions: []
actions:
- variables:
area: >-
{{ area_name(trigger.device_id) if trigger.slots.area is undefined else
trigger.slots.area }}
- action: light.turn_on
data:
kelvin: 2800
target:
entity_id: |
{{ expand(area_entities(area))
| selectattr('entity_id', 'match', 'light.')
| selectattr('state', 'eq', 'on')
| map(attribute='entity_id')
| list }}
mode: single
1 Like
Thanks. I was hoping it had something built in but I see how I could build what I need from this example.
@Didgeridrew Thanks, this was really handy!!