Allow automations to pass parameters to scripts

This would allow scripts to use the new choice features based on info passed from an automation that triggered the script to run.

Here is an example use case. Say I have an automation that sets up the media devices to watch some tv. This needs to check whether the tv is on, and if not, switch it on and wait a while before sending the channel command to it. Then I have to do the same check, switch, wait, channel process for my amp.

It would be better for the automation to hand off to two scripts to handle the check, switch, wait, channel bits so they could happen independently. But as I have four or five possible "channel’ options in each case, that would need multiple scripts. If I could pass the channel data to the script I would only need one script for each device.

Is that not what you mean? Passing variables to scripts?

1 Like

Indeed. Not sure how I missed that in the docs. I thought I’d read them all back to front (sigh!). OK - ignore me!