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

LUA : Night / Day


Question

Posted

Hello to all,

Is there a function in LUA to have night and day state ?

I'm looking for something like :

Please login or register to see this code.

Thanks for your help.

7 answers to this question

Recommended Posts

  • 0
  • Inquirer
  • Posted

    Mmm that sound great, but... it seems to work for HC2 not HC 3 ? How can I update this scripts for HC 3 ?

    • 0
    Posted

    Hi,

     

    Yes, it is for HC2.

     

    It was developed by Zoran. We'll have to wait for him to update it.

    But he's out on business now and he's unlikely to be able to do that for a few months.

    • 0
  • Inquirer
  • Posted

    I've wrote a QA to get sunrise/sunset times request from 

    Please login or register to see this link.

     but it's terribly... useless.

    I realise, I just need :

    • a global variable defined in General > Variable (Enumerated variable with "day" and "night")
    • a blocky scene (triggered on "Time > sunset ") that change the previous variable to "night"
    • a blocky scene (triggered on "Time > sunrise") that change the previous variable to "day"

    And I got my variable with the current state ... soooooo simple ?

    • 0
    Posted

    I had the same need just a few days ago. I did exactly the same as you: new global variable plus 2 block scenes. Simple and works great!

    • 0
    Posted

    Maybe the QuickApp toolbox can offer a solution? 

     

     

    • 0
    Posted

    Also, if you want to create a Lua scene that does some time scheduling - like setting time of day variables etc you can build on this example:

     

    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...