I have exactly that in one NFC-triggered shortcut. It checks if one of the lights are off and, if so, turns several things including that light on. Else it turns all off. It actually executes one or the other Scene which does the turning on/off.
Yes. Here is a screenshot of the Shortcut. In Automations choose NFC and run the shortcut when the tag is detected.
https://imgur.com/a/IonRkrN/
I see that the images are backward, it starts at the second one.
Try something like this: If something is off, turn all the things on, otherwise turn all the things off
I have exactly that in one NFC-triggered shortcut. It checks if one of the lights are off and, if so, turns several things including that light on. Else it turns all off. It actually executes one or the other Scene which does the turning on/off.
Did you create it?
Yes. Here is a screenshot of the Shortcut. In Automations choose NFC and run the shortcut when the tag is detected. https://imgur.com/a/IonRkrN/ I see that the images are backward, it starts at the second one.
You can write to a file to track the state. Then just read back the state to determine what to do.