[SOLVED] Why is this not working ?

Moderator: leecollings

Post Reply
Kerneldomoticz
Posts: 40
Joined: Friday 25 March 2016 22:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5248
Location: Paris, France
Contact:

[SOLVED] Why is this not working ?

Post by Kerneldomoticz »

Hello all,

i created a blocky script but at night the set level will not work :( if i change the value during the day time it works like a charm ... anybody knows why ?
if you have any idea they will be more than welcome.

Thx by advance !
FLo

here is the script :
Attachments
blocky1-lightdimer.JPG
blocky1-lightdimer.JPG (60.34 KiB) Viewed 885 times
Last edited by Kerneldomoticz on Wednesday 27 April 2016 20:34, edited 1 time in total.
User avatar
jvdz
Posts: 2445
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Why is this not working ?

Post by jvdz »

It is probably confused about time>= 23:00 and time < 06:15 as that feels pretty impossible ever happening. :)

Jos
Kerneldomoticz
Posts: 40
Joined: Friday 25 March 2016 22:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5248
Location: Paris, France
Contact:

Re: Why is this not working ?

Post by Kerneldomoticz »

why ??? between 11pm and 6;15am it doesn't exist ?

what would you do ?

Flo
MikeF
Posts: 350
Joined: Sunday 19 April 2015 0:36
Target OS: Raspberry Pi / ODroid
Domoticz version: V2022.2
Location: UK
Contact:

Re: Why is this not working ?

Post by MikeF »

'or' not 'and'
User avatar
jvdz
Posts: 2445
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Why is this not working ?

Post by jvdz »

You are testing for the condition to occur for when the time is both bigger than 23 and smaller than 6 which obviously never will happen. So indeed it test needs to be that the time is either after 23:00 or before 6:15.

Jos
Last edited by jvdz on Wednesday 27 April 2016 9:39, edited 1 time in total.
Kerneldomoticz
Posts: 40
Joined: Friday 25 March 2016 22:30
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5248
Location: Paris, France
Contact:

Re: Why is this not working ?

Post by Kerneldomoticz »

ok thx all for the explanation...

in a normal way of thinking time exist between 10pm and 6am
but looks like domoticz reset a counter at midnight which break my first logic.

the OR change worked like a charm

Thx all for your help ;)

Flo
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest