I’m thinking about extending the coverage of my voice assistants and having three across the house. These would be esphome based devices, probably the esp32-s3-box3.
If I were to sit in one room and say ‘turn on the lights’, I’d want the lights in that room to turn on.
If I were in another room, with another s3-box, and said the same sentence, then the lights in that room would turn on instead, and not in the first room.
I think I can do this via an automation if I can detect the entity_id of the device that triggered the assist, then use a choose condition to turn on the revelant entities.
I did wonder. I’ve never really bothered with areas before, but now it seems this could be the thing that pushes me over the line to learn more about.
I have since figured out how to do it using an automation and the assist_in_progressbinary_sensor, but if I can get what I need out of the box, then even better still.
So I’ve added a light group to an area, and added the voice assistant device to the same area. I can now say 'turn off the {area name} lights and it works perfectly, knowing what lights are assocated to that area.
However, I still can’t say ‘turn off the lights’ and for HA to know which room I am talking about, based on the assocation of the assist device and the area.
I’ve worked around this by using an automation that checks for which device was activated and this works fine, but am I still missing something ?
I’ll give that a go.
I’m still curious why ‘turn off all the lights’ is affecting the whole house, when it also appears to be an area specific phrase:-
# Turn off lights in the same area as a satellite device
- sentences:
- "<turn> <all> <light> off <here>"
- "<turn> <light> off <here>"
- "<turn> <all> <light> <here> off"
Ah yes, it appears to be where I am placing the word ‘off’ for one.
Those two links you’ve sent have been super useful in my understanding of how the sentence construction works.
‘turn off the lights’ also doesn’t seem to match any of the area based phrases either.
The only one without <here> is:
"<turn> <light> off"
Which with the expansions, could be:-
(turn|switch|change) [the] (light|lights|lighting) off
which becomes (for me), turn the lights off, NOT turn off the lights (which is what I am saying to my device).
Although in this video (admittedly 7 months old, he is also saying ;turn off the lights’) and its working based on the area.
EDIT:-
Ignore the above… there is one which should work for me:-