snarky-snark / home-assistant-variables

A custom Home Assistant component for declaring and setting generic variable entities dynamically.
Apache License 2.0
274 stars 16 forks source link

varible for caller list results in value: "[object Object]": null #83

Closed Bram-diederik closed 5 months ago

Bram-diederik commented 1 year ago

I have a asterisk server and i want to get the last 5 callers in a display in home assistant. but i cant get the variable set with the call data.

alias: inkomende beller
description: ""
trigger:
  - platform: webhook
    webhook_id: sip_call_webhook_id
condition: []
action:
  - service: var.set
    data:
      entity_id: var.call1
      value: {{trigger.json.caller | regex_findall_index("\"(.+)\"|\<(.*)\>")  }}

it results in

  - service: var.set
    data:
      entity_id: var.call1
      value:
        "[object Object]": null

is trigger.json. supported. Or do i doing something wrong. (I can set other variables)

snarky-snark commented 5 months ago

It looks like trigger.json is returning a dict with an object as a key.