#How does the default conversation agent work

1 messages ยท Page 1 of 1 (latest)

wary jolt
#

here is a good place for a thread

oblique shuttle
#

๐Ÿ‘ cheers

wary jolt
oblique shuttle
#

Just realised light_devices comes from the same file, I am a plonker haha

wary jolt
#

oh haha

#

i was actually just looking for it, as i couldn't remember where we used it

oblique shuttle
#

Thought it was a list of "light" entities but makes sense it's not

#

As <name> is the actual entity

#

Is there a way to see which sentence actually matched the input speech?

#

Like in the debug screen or something

wary jolt
#

no, there isn't yet

oblique shuttle
#

Fair enough ๐Ÿ‘ out of curiosity, how are you planning to expose the entity ID to custom intents? Just something like {{ rule_name_entity_id }} ? So Turn on <name> would let you use {{ name_entity_id }}

wary jolt
#

i only know it's needed and not there. i haven't thought of the actual solution yet

oblique shuttle
#

Would you mind me having a go at implementing exposing entity ID to script intents and opening a PR? Just want to have a play around with the assist code ๐Ÿ˜

#

Don't want to steal the work you're planning on doing haha

wary jolt
#

are you kidding? you're absolutely welcome to have a go

#

it's not my code, you know ๐Ÿ˜› i'm not even a code owner on the core repo ๐Ÿ˜›

oblique shuttle
#

Thanks! It seems like it should hopefully just be adding something to ScriptIntentHandler#async_handle if I've understood the code correctly

oblique shuttle
wary jolt
#

if I may offer some advice, though: if you mind having your PR rejected because of a fundamental change required, drop a question on #devs_voice-archived first. if you don't mind redoing the work, you'll get the same in the PR

oblique shuttle
#

Good shout ๐Ÿ‘ will bring it up there, thanks!

wary jolt
#

i mean about the approach, not whether you should do it

oblique shuttle
#

That code you sent before which passes the entity names as a slot - am I losing it or does it not actually pass the entity ID in? It seems like it's just passing the name in? Unlike areas which pass a (name, area_id) tuple in, it looks like it uses a (name, name, {"domain": ...}) tuple

#

Need to put some breakpoints in it really and work out what's going on

#

I wouldn't worry about it ๐Ÿ˜ appreciate all the help

wary jolt
#

use the breakpoints, Luke! no offense, but that's what I did to better understand what's behind the hood and I could use not being among the few who did

oblique shuttle
#

Yeah breakpoints are definitely where it's at. Laptop is broken at the moment though so will have to use work computer and set it all back up ๐Ÿ˜ญ

karmic wave
#

I think the name is passed in and then it goes to _has_name which checks the entity registry and the device registry including aliases for both

oblique shuttle
#

So the intent engine never actually gets the entity ID?

oblique shuttle
karmic wave
#

It's definitely in there as part of the returned states

oblique shuttle
#

I'll have a play around. I could just use async_match_states as it looks like all of its args are optional, so we could just pass through the ones which we have (e.g. a sentence using name would just lookup on name, one with area+name would use both, etc)

karmic wave
#

I'm away from my computer at the moment and at my nephew's 10th birthday, so I'd better potter off.