How did you forced an entity update ?
My guess would be the homeassistant.update_entity action.
You need to trigger the relevant multiscrape action “Multiscrape: Trigger an update of [name of the relevant multiscrape entity]”. I did it both via an automation and also the standard interactions of a tile.
Have you succeeded with payload_template working dynamically?
I’m trying to talk to perplexity via api, so created input_text for entering prompt and rest sensor for sending rest request:
- platform: rest
name: "Perplexity AI Response"
resource: "https://api.perplexity.ai/chat/completions"
method: "POST"
headers:
Authorization: "Bearer pplx-xxxx"
Content-Type: "application/json"
json_attributes:
- choices
payload_template: >
{
"model": "sonar",
"messages": [
{"role": "user","content": "{{states('input_text.ai_communication')}}"}
],
"max_tokens": 50,
"temperature": 0.7
}
value_template: "{{ value_json.choices[0].message.content}}"
scan_interval: 32000
When I reload REST entities it works as expected sending prompt with current value of input_text, but when I change prompt in input_text and call
action: homeassistant.update_entity
data:
entity_id:
- sensor.perplexity_ai_response
It doesn’t use new value of input text. Sends request with the one available during entity reload.
Your yaml looks like a mix between legacy rest sensor syntax and modern. So, depending on which path you are trying to take, they are both wrong.
Describe “call” … in an automation or?
That doesn’t matter. Right now they are apparently trying to use legacy platform rest syntax. That does not support payload_template. However modern style rest integration does support payload_template, however the configuration is a bit different as value_template and a few other fields will go under the sensor field. So, their configuration is just wrong in both scenarios.