Can't call HA services/scenes/scripts with iOS Shortcuts

Hi, I’m trying to use NFC tags to run stuff via HA, HA Companion for iOS and iOS Shortcuts. I have an iOS Shortcut to run a HA script (to turn off everything when I tap the entry door tag). The script simply calls switch.turn_off services inside HA.

However, I can’t call these scripts via the Home Assistant commands. I call the “script.turn_on” service with this payload:

"entity_id: script.xxxxx"

That gives me this:

When called with curly brackets, {“entity_id: script.xxxxx”}, it gives me this:

The same goes for Scenes. Calling individual services like “switch.turn_on” in Shortcuts works as expected but I’m not entering that one by one into the Shortcuts app :slight_smile: Nothing related in HA log. Any tips?

EDIT: all the scripts and scenes DO work when called directly via HA web ui or automations.

I just got it working just adding two curly brackets in “text” field like this:

2 Likes

Thanks for this. Was very glad to find your answer without too much searching!

You’ll have a much improved experience with the Shortcuts for the app if you use the “Dictionary” action/methods, e.g.:

For the empty one, it looks like it will only error when you enter text and then remove it. I created a ticket for this.

Very cool, thanks!

Anyone else has ever experienced this?
When I try to select a service, it gives an error:

Try this:

{“entity_id”: “script.xxxxx”}