Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team
Question
reading123 0
Hi,
I've got a (hopefully!) simple request for help!
I'd like to have a Lua scene triggered when a motion sensor activates, which turns a light on and stores the current date/time in a global variable "LastActivatedTime"
I'd like another Lua scene that activates every 1 minute that checks the date/time stored in the global variable "LastActivatedTime" and, if that time if greater than 15 minutes from now, turns off the light.
The bit I'm confused about is how I should store a date/time in a global variable, and how I can read that date/time out of a global variable and back to a Lua date object...
Thanks in advance for your help!!
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.