I used to have an applescript that would open the light according to the point of entry into the house that went like this
- Code: Select all
if the value of variable "DSC_Entry_point" is "Porte garage-maison" then turn on "Portique" in 5 for 180
if the value of variable "DSC_Entry_point" is "Garage" then turn on "Passage Garage Salle d'eau" in 5 for 180
But now with the new DSC plugin i dont have the same hooks to make this work, so I would need help to re-write the script either in python or apple script.
The output remains the same, but the hooks are different
So here are what I think are the proper hooks to trigger the proper the action but don't know how to code it!
Device state changed: Porte Garage-Maison: Changed Timer (mins.) changed; become less than 2; then turn on "Portique" in 5 for 180
and the other should be
Device state changed: Porte Entree principale: Changed Timer (mins.) changed; become less than 2; then turn on "Passage Garage Salle d'eau" in 5 for 180
Hope fully someone can help me and understand what I'm trying to achieve!