Rule refuses to add any new actions

I was working on a new rule and had "paused" a couple existing actions and was adding another action to replace it. However, when I clicked on the green + icon to add a new action above an existing action, this error appeared:

After that I was unable to add any new actions, regardless of putting them between existing actions, or at the end of the existing set of actions using the "<--Create New Action" option. Any attemp to add an action resulted in the same error. Saving the rule and coming back in didn't help, nor did deleting one of the paused actions.

1 Like

Did you ever have a thermostat selected in this rule, by chance? If so, what driver is it using? It looks like it's putting quotes inside what is supposed to be the JSON list of supported operating states. The format for this attribute was recently clarified, and I'm not sure that an "old" format is supposed to break any apps (yet), but this doesn't even look like that but a mix of both. It's probably a good idea to address that in the driver if possible.

2 Likes

Good guess, I was trying to add a virtual thermostat that I was going to use for some testing of the rule. The virtual thermostat is using on of Hubitat's virtual drivers.

1 Like

I just created a new virtual thermostat, and the supportedThermostatModes attribute value looks correct to me, though I'm not sure what this may have been set to in the past. I think I've fixed any of mine already where I noticed it, probably when I was writing the Thermostat Scheduler and Thermostat Controller 2.0 docs and knew something was off. :slight_smile:

You can manually fix yours by running the setSupportedThermostatModes command from the device detail page and providing something like ["auto","cool","emergency heat","heat","off"] as the value, or whatever modes you really want (the key is making it a valid JSON array, no quotes on the outside). You might want to check the supported fan modes while you're at it.

Whether apps could handle this differently or if there was some problem with the driver in the past that could be addressed in a different way, I don't know...

1 Like

I fixed the modes but the rule still won't let me add anything.

It's not a big deal for me it's just a testing rule. I'm going to delete it and start over. But it seems like something needs to be done from what you said to fix the drivers for the virtual devices they don't cost this problem. Or am I misunderstanding?

Yeah, it's possible the rule already cached something by that point that broke it (though, not having written the app, this is a guess and I don't really know if/where it stores the information). The current virtual driver definitely seems fine to me--the part I'm not sure of is what this did in the past. The string in your error message is a bit unusual since it's neither the old (Groovy List as string, even though I think it was always supposed to be JSON) nor new (a legitimate JSON array) format from what I can remember, so I'm not sure how that may have been set.

1 Like

Just to close this out, I created a new rule and when I tried to add the existing virtual thermostat the rule immediately threw the same error again.

Created a new virtual thermostat and it adds to a rule fine. :slight_smile:

Some differences in supported modes between the two:

Original:
image

New:
2022-10-12 08_34_26-Chrome Main

But I'm good, just sharing in case you were interested.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.