The error is: Invalid JSONata expression: Invalid context key
Here is my node:
[{"id":"1e0a4c9d9b44c848","type":"switch","z":"3a2942f23b8df6dc","name":"Bedroom?","property":"payload.cover","propertyType":"msg","rules":[{"t":"jsonata_exp","v":"payload.cover != \"cover.bedroom_blind\" or\t (payload.cover = \"cover.bedroom_blind\" and \t $globalContext(homeassistant.homeAssistant.states[\"person.daniel_brunt\"].state) = \"home\" and \t $globalContext(homeassistant.homeAssistant.states[\"input_boolean.sleep_mode\"].state) = \"off\")\t","vt":"jsonata"}],"checkall":"false","repair":false,"outputs":1,"x":619,"y":1120,"wires":[["3aabdce8ca72cedb","dad60146b95672f9"]]}]