You could try using virtual devices for each device that you want to know the previous state of before the house went into Alarm mode. Do you have a device in HS for the Alarm status? If so, and lets assume that it is, A1, then if you have a light device, say L1, you could create a virtual device for it, say S1. Then create an event that sets s1 "on" whenever L1 is set "on" BUT put in a condition that A1 (alarm status) is "off" (Using off for disarmed, on for armed). Then also creat an event that sets s1 "off" whenever L1 is set to "off" and again put in the condition that A1 is "off".
Then when you arm your system, and A1 goes to "on" (armed) and you shut all your devices off, which L1 is a part of, s1 will stay at "on" because the event above won't fire because A1 is "on".
When A1 is then set to "off" (disarmed) have an event that sets L1 to "on" using the condition that s1 is "on", and also an event that would set L1 to "off" if s1 is "off".
This is alot of work I know, but if the scripts aren't working for you, this is a way around that. If you have alot of devices, which it seems that you do with 20, after you create all of the above events, putting them into their own group, say Device Holdings, then you can copy them and edit them as needed, if that makes it easier for you.
HTH
Then when you arm your system, and A1 goes to "on" (armed) and you shut all your devices off, which L1 is a part of, s1 will stay at "on" because the event above won't fire because A1 is "on".
When A1 is then set to "off" (disarmed) have an event that sets L1 to "on" using the condition that s1 is "on", and also an event that would set L1 to "off" if s1 is "off".
This is alot of work I know, but if the scripts aren't working for you, this is a way around that. If you have alot of devices, which it seems that you do with 20, after you create all of the above events, putting them into their own group, say Device Holdings, then you can copy them and edit them as needed, if that makes it easier for you.
HTH
Comment