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
tampiss 2
Hi guys,
I would please need help with my scene. My aim is to turn automatically light off after specific time.
This works until this happens:
1) user turns the light on
2) user turns the light off before 10 minutes
3) another user comes and turns the light on
4) the previous scene is still running and turns the light off when it finished 10 minutes
What I would like is:
1) turn manually light on and start counting 10 minutes
2) if the light was not turned off manually within 10 minutes, turn the light off
3) if the light was turned off manually within 10 minutes and another user turned the light on again (within the first run), start new sleep for 10 minutes and so on
Here is what I have:
--[[
%% properties
45 value
%% events
%% globals
--]]
if (fibaro:countScenes() > 1) then fibaro:abort() end;
local myState = tonumber(fibaro:getValue(45, "value"))
if (myState > 0) then
fibaro:sleep(10*60*1000);
fibaro:call(45, "turnOff");
end
Thank you for any help,
tampiss
1 answer 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.