I can now answer my own question: In the rules file switch (myScenes) {
should be
switch (myScenes.state) {