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

Reset a light level after running a scene


Question

Posted

Hi,

I am new to Fibaro and just starting to experiment with block scenes. Can someone help with the following;

 

I want to run a scene that turns on a bathroom light to say 20% when a motion sensor is triggered in the night.  (ie - so that when my children wake up in the night they can go to the bathroom with a dim light already on)   Got this part sorted.

Problem is;

What I want to also do is - after the light has been on for say 1 minute, its turns off and then resets the light back to it's previous level (without the light having to come on) so that the next person to turn the light on at the switch doesn't have to hold down the dimmer switch to bring it back up to its default of say 80%

 

Thinking it may need variables? or wondering if it can even be done at all in block scenes?  Its a bit frustrating that the "set value" function also turns the light on rather than just setting the value of the light.

 

Thanks for any help you may offer.

 

1 answer to this question

Recommended Posts

  • 0
Posted

Seems like you will very easily have to go into LUA programming here.

I have one similar scene where the light levels are dynamic depending on the time of day. 

 

So during daytime, maxValue will be 100 and minValue will be 0. So it will act like a normal on-off switch with movement sensor with a timer to dim down again to minValue. 

During nighttime, the light should not go entirely off, so dimmed down to 5% maybe. And 15% when there is movement. So my kids are not afraid to walk down the scary hallway..

 

That can be solved by local variables

 

My code is tailored to my system with global variables, so sharing it here would be confusing I guess..

Anyway, here it is. It also has code for a manual-set lights to 50% mode activated by a lightswitch and sceneActivation. Just remove whatever you do not need.

 

PS, I guess it is poorly coded as well, but it works.

 

 

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