Here are the log:
DimmingObject (id=office_rocker3_long): Compare object='down:1' to value='down:1'
ObjectCondition (id='office_rocker3_long') evaluated as '1'
DimmingObject (id=office_rocker3_long): Compare object='up:1' to value='up:1'
ObjectCondition (id='office_rocker3_long') evaluated as '0'
compare object is the same as the value but it gets evaluated as '0' is this a bug or is it my mistake?
Kindly regards,
Tore
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, it's a bug. I just found it.
The value of direction is normally 1=up or 0=down . In the logs you provided, both values say "up" but the variable behind it is 1 for the constant, and 8 for the object value received from bus (because I forgot to shift it 3bits right). Since the comparison uses integer values, the result is "different".
I'll fix it in next release.
Thanks for finding the bug,
Jean-François
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
I tried to get 4 functions out of one rocker today and noticed that i could not get dim up action to work.
Here are the config:
<rule id="test1">
<condition type="object" id="office_rocker3_long" value="down" trigger="true" />
<actionlist>
<action type="set-value" id="office_rocker1" value="off" delay="0" />
<action type="set-value" id="office_rocker1" value="on" delay="2" />
</actionlist>
</rule>
<rule id="test2">
<condition type="object" id="office_rocker3_long" value="up" trigger="true" />
<actionlist>
<action type="set-value" id="office_rocker1" value="off" delay="0" />
<action type="set-value" id="office_rocker1" value="on" delay="10" />
</actionlist>
</rule>
Here are the log:
DimmingObject (id=office_rocker3_long): Compare object='down:1' to value='down:1'
ObjectCondition (id='office_rocker3_long') evaluated as '1'
DimmingObject (id=office_rocker3_long): Compare object='up:1' to value='up:1'
ObjectCondition (id='office_rocker3_long') evaluated as '0'
compare object is the same as the value but it gets evaluated as '0' is this a bug or is it my mistake?
Kindly regards,
Tore
Hi,
Yes, it's a bug. I just found it.
The value of direction is normally 1=up or 0=down . In the logs you provided, both values say "up" but the variable behind it is 1 for the constant, and 8 for the object value received from bus (because I forgot to shift it 3bits right). Since the comparison uses integer values, the result is "different".
I'll fix it in next release.
Thanks for finding the bug,
Jean-François