Homeassistant iOS app widget actions

Tags: #<Tag:0x00007f738ec85010> #<Tag:0x00007f738ec84e80> #<Tag:0x00007f738ec84db8>

Hi there, im a bit new to HA, in the start of line. Ive managed to connect some devices, and got them to work using webhooks.
I see that HA ios App has buttons in the iphone widget area. Im trying to create , but cant get them working. How do i do that.

So in the app when creating a widget it gives a template

- platform: event
  event_type: ios.action_fired
  event_data:
    # source may be one of:
    # - appShortcut
    # - preview
    # - siriShortcut
    # - watch
    # - widget
    actionID: 9A3F3B6B-8D57-4E7E-81FB-13151FD5E613
    actionName: 
    sourceDeviceID: iphone_dubinin
    sourceDeviceName: iPhone (Dubinin)
    sourceDevicePermanentID: D514478F-02D2-4142-8A70-297AD40706B6
    triggerSource: preview

I tried to delete that and make a simple

action:
  - data:
      entity_id: switch.sonoff_1000351bb9
    entity_id: switch.sonoff_1000351bb9
    service: switch.turn_on

but that didn’t save, and didnt work.

How exactly this should look like to swtich on entity.

anyone has a clue?

Can you share what your overall automation looks like?

My Automations i want to use are two gate openings

And in the app i have the following code i mentioned

The triggers in your screenshot there are using the “webhook” platform, but you want to use something similar to the example the app is showing you.

i showed my automations that im using with webhook, they work good and i want it to work without a webhook third party server. I want it to work directly to HA ip by its ios App.
Can someone help me give the correct way i can do that?

- id: '1597258014342'
  alias: gates
  description: ''
  trigger:
  - platform: webhook
    webhook_id: gateshook
  condition: []
  action:
  - data:
      entity_id: switch.sonoff_1000351bb9
    entity_id: switch.sonoff_1000351bb9
    service: switch.turn_on
- id: '1597595035406'
  alias: garagehook
  description: ''
  trigger:
  - platform: webhook
    webhook_id: garagehook
  condition: []
  action:
  - data: {}
    entity_id: switch.sonoff_1000357c8f
    service: switch.turn_on
- id: '69FFFB29-803C-471B-830D-80D0E2ED7BCE'
  alias: GatesHAapp
  description: ''
  trigger:
  - event_data:
     actionName: 'Gates'
    event_type: ios.action_fired
    platform: event
  condition: []
  action:
  - data: {}
    entity_id: switch.sonoff_1000357c8f
    service: switch.turn_on

thats the way i tried, and in the app i named it Gates - but no action fired

Your trigger looks like it may be missing a space before the actionName (looks like there is only one not two to me). Try:

  trigger:
  - event_data:
      actionName: 'Gates'
    event_type: ios.action_fired
    platform: event

Thank you, added a space there, but still not working

Might be be worth checking what payload you’re receiving. If you go to events in developer tools at the bottom you can listen for events for debugging. If you enter ios.event_fired where it says ‘event to subscribe to’ the click ‘start listening’. Then try the action on your phone and see what come up there

Okay i did it thanks bro
It was all about not having the last version of HA.
Event bus first returned nothing, when i updated it got all working.

Thanks for help everyone!

1 Like