Virtual Switch and Rules error <XFeatureCallImplCustom>.State

I am trying to setup a rule so at a certain time it will perform some actions (turn light on…etc). I have read on here to create a virtual switch to allow me to control if the code in the rule should be ran. When the rule checks the virtual switch it always give the same error “.State’ cannot be resolved to an item or type”. Any suggestions on what I doing wrong? I would like to get this into PaperUI if possible but if not then the old way is fine.

Switch VIRTUAL_WAKE_UP_ALARM “Wake up alarm” [“Lighting”]

rule "Bedroon_wake_up_alarm"
Time cron "0 12 6 ? * *"

try .state (with a lower case s); Designer can help a lot with syntax errors:

Thanks lipp, It’s always the little things to seem to get me. This time case sensitivity.