home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.53k stars 296 forks source link

Notification with shortcut won't pass any data to the shortcut #2364

Open gsportelli opened 1 year ago

gsportelli commented 1 year ago

iOS device model, version and app version

Model Name: iPhone 13 mini Software Version: iOS 16.4.1 (a) App version: Home Assistant Companion 2023.4 (2023.460)

Home Assistant Core Version Home Assistant 2023.5.3

Describe the bug When I pass data to an iOS shortcut, the shortcut receives nothing.

To Reproduce

Create an iOS shortcut with a single message box that shows the input to the shortcut (by default it will accept anything, i.e., images and any of the other 18 allowed types, in Italian "Immagini e altri 18") image

Call service:

service: notify.mobile_app_gkipdm
data:
  message: The garage door has been open for 10 minutes.
  title: Your Garage Door Friend
  data:
    shortcut:
      name: "Test1"
      mytext: "this is my text"

Expected behavior The messagebox should show the input data, I guess a dictionary with mytext. It shows nothing instead.

Screenshots IMG_3122

yyolk commented 1 year ago

I was attempting to utilize this today. I was running through a loop seeing how it was sent into the shortcut.

For context, here's the relevant docs: https://companion.home-assistant.io/docs/integrations/siri-shortcuts#executing-a-shortcut-via-home-assistant-notifications

image

FWIW - the fired event, of the shortcut ios.shortcut_run shows the input, so I know it's being passed.

For posterity here's an event of a shortcut I was testing. I wanted to add some more utility to a tea steeping timer automation I have setup, so the only key I'm attempting to pass is mgcaffeine with a value of "67", which would then be able to log it in Apple Health.

event_type: ios.shortcut_run
data:
  device:
    sourceDeviceID: ...
    sourceDeviceName: ...
    sourceDevicePermanentID: ...
  input:
    mgcaffeine: "67"
    name: Test Hass Invocation
  name: Test Hass Invocation
  status: success
origin: REMOTE
time_fired: "2023-07-17T22:05:19.194795+00:00"
context:
  id: ...
  parent_id: null
  user_id: ...

I was starting to think this was a way to pass callback data, i.e., context sent back to home assistant from the original invocation - until I stumbled upon this issue.

BMWfan commented 9 months ago

I have the same issue. @zacwest do you have any idea?

BMWfan commented 6 months ago

Is there any progress?