#Use area in Assist debug.

1 messages · Page 1 of 1 (latest)

wise sonnet
#

Probably dumb question, but i want to debug Assist with usage of area-awareness now, in Dev Container. Is there any way to do it, or the only way is to use real device? Summoning @ocean canopy and @mental sonnet

wise sonnet
#

And, while i am here, where is actual code for default intents in HA repo?
I tried to search HassTurnOn, but found only one usage in __init__.py for intent component, and it's intended only for Cover, Switch, Valve and MediaPlayer...
I have >10 years in Java/Kotlin, but in this project i can't find a shit. 🙂 Looks like to do that, one should be Python dev...

wise sonnet
#

Or is it complex thing, that should be set up in several repos?

#

I'm curious if it's intentional, that, e.g., error sentences are held in intents repo, but tested in hass repo...

wise sonnet
#

Oh damn, looks like it's intents repo, and there's 61 PR requests awaiting already...

wise sonnet
#

Alright, i ran tests on intents repo, trying to reproduce error with duplicates, and so far couldn't

#

Looks like it's logic in default_agent.py of hass repo. Digging in.

wise sonnet
#

I believe that setting preferred_area_id into slots in intents.py should do the trick - there's logic for deduplication by that slot. If i find the way to set it from assist satellite area, it should work.

ocean canopy
wise sonnet
#

Thank you, I will try it.

#

@ocean canopy but "should use that device's area" is a stretch. I found that device's area isn't set in intent call to preferred_area_id slot. I tried to set that field, and everything started to work good. (I used hard-coded area there, since couldn't test with dynamic one).
If API call works, I will post PR.

wise sonnet
wise sonnet