Home Assistant Script, Reaction requires seclection that isnt there
-
I'm trying to create some automation so I can control my pool variable speed pump from reactor rather than iAqualink (which sucks). My controller is MQTT enabled so I created several scripts for my desired speeds. (I know reactor has MQTT ability but honestly I read the docs and could not make much sense of it and since I already have it set up in Home Assistant, I figured I would just leverage that instead)
So I created all of my scripts and tested them, they worked perfectly. The I created a rule in reactor and set running the script as the action. The problem is that reactor is telling me that I have to make a selection. I try to click the dropdown and there is nothing to select. I cant save the rule, the only option is to exit.
Here is my script in Home Assistant. Any advice on how to get this to work? If I am looking at this the wrong way I am open to suggestions (I would rather be able to call a specific action and specify a speed value but I cannot figure out how to do that). Thanks in advance.
-
The system entity in MQTTController has a
publish
action that you can use directly.The system entity in HassController has a
call_service
action that you can use to call a service on the Hass controller.If your script is only doing the one step of publishing an MQTT message and isn't used otherwise, these are likely more efficient approaches.
As for the script action, Hass supplies the possible actions for the script, so it appears that Hass is telling Reactor that there are no possible actions. This could simply be because Hass and Reactor are not in sync with respect to the definition of the object (i.e. you've made a bunch of edits to the script but haven't restart Reactor and refreshed your browser since). Restarting Reactor and hard-refreshing the browser are always recommended.
Please make sure to include your Reactor version and platform information on posts, and if your question relates to a specific platform/controller as this one does, the version number of Hass and its environment details may also be useful and should be provided. On your screen shot, you're only showing part of the script definition; the part before what is shown that defines the type of script and other script options may also provide information about why the actions aren't present.
I made a test script like yours and it looks like this in the Reaction:
Here's the script:
I made another that does an MQTT Publish like yours and it looks and works the same, and is invoked correctly by the Reaction.
-
Thanks! I got the scripts working now so I have a way, although ugly as it is.. I did setup MQTT in reactor but the documentation has me very confused. I don't know how to create a template or anything like that. I basically just want to be able to publish a value that I specify to aqualinkd/Filter_Pump/RPM/set. Is there an easy way to make that work?
-
Thanks! I got the scripts working now so I have a way, although ugly as it is.. I did setup MQTT in reactor but the documentation has me very confused. I don't know how to create a template or anything like that. I basically just want to be able to publish a value that I specify to aqualinkd/Filter_Pump/RPM/set. Is there an easy way to make that work?
@sethlampman said in Home Assistant Script, Reaction requires seclection that isnt there:
I basically just want to be able to publish a value that I specify to aqualinkd/Filter_Pump/RPM/set. Is there an easy way to make that work?
Yes. No templates required. All you need to do is this (assuming you have MQTTController configured):
As I said in my earlier reply, the
publish
action lives on MQTTController's system entity, which has the canonical IDmqtt>system
(assuming your MQTTController ID ismqtt
as shown in the docs). -
T toggledbits locked this topic on