Jump to content

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


  • 0

Don't run scene between x and x


Question

Posted (edited)

Hello all,

 

For days ive been trying to figure out how to make sure a scene does not run between specific times.

For example right now with a simple scene and Virtual device, we automatically enable our Airco to go on when temperature goes above 24degrees celsius. When it then goes below 23, we power the Airco off again.

 

This works just fine with those two scenes, however we would love for it to not run at all between 0:00 at midnight and 07:00 in the morning.

 

Any idea how to accomplish this?

 

Thx

Edited by T.Konopka
Wrong category. Moved from Crowd's Solutions.

13 answers to this question

Recommended Posts

  • 0
Posted

you can activate / deactivate a scene from another scene. I have one timebased "schedule" scene for the whole day for all scenes triggered by a timer. In such a scene you could put the activation / deactivation command.

  • 0
Posted

Simplest solution - Create a global variable called "Night." Use two scenes to toggle it on/off (1/0) at the desired times. Then inside the working scene, just check to make sure it's day time and the scene needs to run.

  • 0
Posted

or use something like

 

Please login or register to see this code.

  • 0
Posted

I'm not 100% sure but I don't think you can compare strings like that.

  • 0
Posted

yes you can

  • 0
Posted

Indeed, looks like you can. That's good to know, thanks!

  • 0
  • Inquirer
  • Posted

    Ok, so if this currently is the scene to start it when temp is higher then 24, what should i change?

    This basically looks at netatmo and if the temp is higher then 24 it should press button 4 (Airco = On cooling mode).

    Please login or register to see this code.

    Where should I insert your code:

    Please login or register to see this code.

    • 0
    Posted

    Here you go:

    Please login or register to see this code.

    • 0
  • Inquirer
  • Posted

    Thanks but isn't that missing the 00:00 part?

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    • 0
    Posted

    nope, everything between 00:00 and 07:00 is excluded now, because 00:00 is smaller then 07:00 and it works only if the current time is bigger then 07:00.

    • 0
  • Inquirer
  • Posted

    Ok, very cool thank you

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> So if i change 07:00 to 08:00 it wont start before 08:00 in the morning, right, but will continue untill 0:00 at night?

    • 0
    Posted

    That is right.

     

    If you want not to run the scene between 23:00 and 07:00 it will look like:

     

    ( (tonumber(fibaro:getValue(377, "value")) > 24) and (os.date("%H:%M") > "07:00")  and (os.date("%H:%M") < "23:00") )

    • 0
  • Inquirer
  • Posted

    Thanks again

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> I guess this is fine now (stops running between 00:00 - 08:00):

    Please login or register to see this code.

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.

    ×
    ×
    • Create New...