#Using template inside an automation - HELP

1 messages · Page 1 of 1 (latest)

blissful sluice
#
action: notify.persistent_notification
metadata: {}
data:
  message: >-
    Defined - {{ importance is defined }},
    Value - {{ importance.response_text }},
    Both - {{ importance is defined and importance.response_text == 'passive' }}.

'importance' is the response from the llm vision action

The notification that is sent is shows:

Defined - True, Value - passive, Both - False.

If its defined, and set to 'passive' why does the last test fail?

hidden marsh
#

Without seeing the importance object, I'd think that the response_text isn't exactly passive, perhaps there's a leading or trailing space or something like that

blissful sluice
#

how can i display the entire object?

#

im very new to this

#

ahh

{'title': 'Passivity seen\n', 'response_text': 'passive\n'}
hidden marsh
#

Yeah, newline at the end

blissful sluice
#

how would i go about stripping that out?

#

or just leave it and match to 'passive\n' ?

hidden marsh
#

importance.response_text | trim will trim that