Bug in RM code


#1

Bruce (@bravenel) I've found bug in RM code

Unexpected Error

An unexpected error has occurred trying to load the app. Check Logs for more information.

Error: String index out of range: -1

Steps to reproduce:

  1. Create Rule and name it
  2. Go to Select Actions for True or False
  3. Select Control Switches
  4. Select Turn on or off after a delay per mode, pending cancellation
  5. Pick any switch from the list
  6. Choose Delay by mode for one mode ONLY(if more than one mode is selected error is not produced)
  7. Get error

It looks like the array initialization is incorrect in this particular case. If two modes are selected, but later one mode is unselected the error is not produced either)


#2

Thanks for reporting this. Found and fixed.