added test for on powerOn state to make work with node-red