Jump to content

isy994.set_variable Throws "coroutine raised StopIteration" Error


Recommended Posts

Posted

I switched from using Polyglot Cloud to using a local copy of Home Assistant with the ISY Integration installed. Although HA recognizes my ISY994i and all of its devices, I've been trying to use HA to replace some of the external features of the Polygot Cloud around tracking the calendar month / date / year, and the current outside temperature.

I've created a couple of variables on the ISY but have been unable to get the isy.set_variable service call to work - instead it always throws the error: coroutine raised StopIteratio

I'm running HA Core 2022.5.0 with HA Frontend version 20220504 and with ISY firmware 5.3.3 and the script I'm using is below:

service: isy994.set_variable
data:
  init: true
  value: 64
  name: CurrentMonth

My eventual goal is to replace the "value: 64" line with something similar to "value: now().strftime('%-m')", but since the set_variable call does not work with a simple integer I'm stuck. Does anyone have any suggestions about what could be going on here?

Posted

I will take a look when I get a chance, but are you trying to set the init value or the current value? Does it give the same error for both?

init: true sets the init value.

Posted

I use isy994.set_variable a few places and don't have any issues.   Have you tried using Type: and Address: in place of name to see if that works?  Have you verified that the name CurrentMonth is a unique name and only exists as either a State or Integer variable.... and that it does in fact exist with that exact spelling and case?

  • 3 weeks later...
Posted (edited)

@indomitableMan Sorry it's taken so long for me to test, but I was able to recreate your error. I think it boils down to something very simple--

You must reload the Home Assistant ISY994 Integration after you make changes in the ISY Admin Console, such as creating or renaming variables.

Only states and values are updated on-the-fly by Home Assistant, any changes to the "definitions" of the nodes, variables, and programs--such as creating, renaming, or deleting--are only updated on initial loading or broken connections.

Edited by shbatm
  • Like 1
Guest
This topic is now closed to further replies.

×
×
  • Create New...