Fixes #10 device state on action and  trigger now correct