Found an answer: create the automation in the Shortcuts app (not the Home app) and this will work.
Topic:
App & System Services
SubTopic:
General
Tags: