added a switch predicate provider that decides "device is turned on" and "device is turned off"