folgende Regel will einfach nicht so wie ich es will, und ich verstehe nicht warum.
Item:
Code: Alles auswählen
Number test1_hoch
Code: Alles auswählen
rule "test1_hoch"
when Item ESP8266_1 changed
then
var State = ((ESP8266_1.state as DecimalType).intValue)
if (State <= 65)
{
test1_hoch.postUpdate(0)
}
if ((State >= 65) && (test1_hoch.state == 0))
{
sendTelegram("ak", (ESP8266_1.state))
test1_hoch.postUpdate(1)
}
end
2019-10-15 11:05:26.704 [vent.ItemStateChangedEvent] - ESP8266_1 changed from 65.20 to 65.40
2019-10-15 11:05:26.722 [vent.ItemStateChangedEvent] - test1_hoch changed from 1 to 0
2019-10-15 11:05:26.956 [vent.ItemStateChangedEvent] - test1_hoch changed from 0 to 1
2019-10-15 11:05:36.679 [vent.ItemStateChangedEvent] - ESP8266_1 changed from 65.40 to 65.50
2019-10-15 11:05:36.698 [vent.ItemStateChangedEvent] - test1_hoch changed from 1 to 0
2019-10-15 11:05:36.914 [vent.ItemStateChangedEvent] - test1_hoch changed from 0 to 1
2019-10-15 11:05:56.674 [vent.ItemStateChangedEvent] - ESP8266_1 changed from 65.50 to 65.60
2019-10-15 11:05:56.691 [vent.ItemStateChangedEvent] - test1_hoch changed from 1 to 0
2019-10-15 11:05:56.896 [vent.ItemStateChangedEvent] - test1_hoch changed from 0 to 1
2019-10-15 11:06:16.674 [vent.ItemStateChangedEvent] - ESP8266_1 changed from 65.60 to 65.50
2019-10-15 11:06:16.691 [vent.ItemStateChangedEvent] - test1_hoch changed from 1 to 0
2019-10-15 11:06:16.913 [vent.ItemStateChangedEvent] - test1_hoch changed from 0 to 1
Warum wird test1_hoch immer wieder auf 0 geschaltet?
In der Rule heisst es doch ganz klar if (State <= 65)