Siri shortcuts on 2.0

It has also broken for me, and I have tried to run some debugging by passing the dictionary into a notification pop-up before the HA service call.

As far as I can tell, the datetime value will come through in the dictionary if no custom format is set. However as soon as I change the format to ‘HH:mm’ (or any other custom format), the value passed into the dictionary is blank.

So I think the new iOS version is casuing this to break, not Home Assistant.

Aaah than that is the problem. I haven’t update my iPhone yet. But if I do, I’ll look at a way to fix this. I think it’s either something in the way dictionaries in Shortcuts are defined or something with formatting the time of the iOS alarm.

A solution could be to skip the formatting in shortcuts app and format the time in the correct form on the home assistant side use ninja templating.

@DutchDeffy Thank you for the effort you put into not only creating the shortcut, but also properly documenting the setup process. I was able to resolve the issue in the latest iOS version of not sending the alarm time to HA anymore. I made a minor change to the helper which loads the alarm time (I still use ‘First Item’) into the text object. I changed the ‘Get’ type from ‘Time’ (which included the custom time formatter) to ‘Default’ so that it shows ‘Item from List’. Fortunately, it seems like the custom time formatter is no longer required.

Hi everyone,

thanks all for your work, i can get the value from iOS clock with “Shortcuts”.
unfortunely, stop me if I’m wrong, the time retrieval doesn’t seem to be as accurate as the one on Android, since we don’t retrieve the date too.

I made an automation in HA, which is triggered when the input_datetime changes, to define another input_datetime containing the date too, I share my code with you

- id: "XXXXXXXXXXXXXx"
    alias: "XXXXXXXXXXXXXxx"
    trigger:
      - platform: state
        entity_id: input_datetime.ios_alarm
    action:
      - service: input_datetime.set_datetime
        target:
          entity_id: input_datetime.ios_next_alarm
        data:
          timestamp: >
            {% set next_alarm = as_timestamp(states('sensor.date') + ' ' + states(trigger.entity_id)) %}
            {% if as_timestamp(now()) < next_alarm -%}
              {{ next_alarm }}
            {%- else -%}
              {{ next_alarm + (86400) }}
            {%- endif %}

Feel free to tell me or correct me if what I’m doing seems correct or not, or to share your ideas to recover the value of the next alarm like on Android