Jump to content

Why does this keep setting Night scene????


retsell

Recommended Posts

I am trying to create a simple away button on a KPL. The button is set to non-toggle mode with LED off. When you press the button I want it to check if it's daytime or night time and set the appropriate scene. Problem is, whenever it's sunset, it always sets the Away Night scene.

 

If

 

Control 'L-KPL C - Goodbye' is switched Off

 

And From Sunrise

 

To Sunset (same day)

 

 

 

Then

 

Set Scene 'Away Day' On

 

 

 

Else

 

Set Scene 'Away Night' On

Link to comment

Hello retsell,

 

The problem is:

You have a non-toggle mode and thus the Control will never ever change its state from Switched Off to anything else (after the first time you switch it off, the state will never ever change). Therefore, your condition amounts to evaluating whether or not it's day time.

 

What you might want to consider is to make this button toggle and use the the program to set its status (you have to put the button inside a scene as a responder) when it's day time.

 

With kind regards,

Michel

 

I am trying to create a simple away button on a KPL. The button is set to non-toggle mode with LED off. When you press the button I want it to check if it's daytime or night time and set the appropriate scene. Problem is, whenever it's sunset, it always sets the Away Night scene.

 

If

 

Control 'L-KPL C - Goodbye' is switched Off

 

And From Sunrise

 

To Sunset (same day)

 

 

 

Then

 

Set Scene 'Away Day' On

 

 

 

Else

 

Set Scene 'Away Night' On

Link to comment

You could also just use two programs:

 

If
       Control 'L-KPL C - Goodbye' is switched Off
   And From    Sunset
       To      Sunrise  (next day)

Then
       Set Scene 'Away Night' On

Else
       - No Actions -

 

If
       Control 'L-KPL C - Goodbye' is switched Off
   And From    Sunrise
       To      Sunset  (same day)

Then
       Set Scene 'Away Day' On

Else
       - No Actions -

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...