|
@@ -129,7 +129,7 @@ try:
|
|
elif serLine == "P2=H":
|
|
elif serLine == "P2=H":
|
|
newState = "ON"
|
|
newState = "ON"
|
|
|
|
|
|
- if newState is not None and lastState_tk != newState:
|
|
|
|
|
|
+ if newState is not None and (lastState_tk != newState or not filterUnchanged):
|
|
lastState_tk = newState
|
|
lastState_tk = newState
|
|
mqttc.publish(config.mqtt_topic_tuerkontakt, newState, qos=0, retain=False)
|
|
mqttc.publish(config.mqtt_topic_tuerkontakt, newState, qos=0, retain=False)
|
|
|
|
|
|
@@ -141,7 +141,7 @@ try:
|
|
elif serLine == "P3=H":
|
|
elif serLine == "P3=H":
|
|
newState = "ON"
|
|
newState = "ON"
|
|
|
|
|
|
- if newState is not None and lastState_pir1 != newState:
|
|
|
|
|
|
+ if newState is not None and (lastState_pir1 != newState or not filterUnchanged):
|
|
lastState_pir1 = newState
|
|
lastState_pir1 = newState
|
|
mqttc.publish(config.mqtt_topic_pir1, newState, qos=0, retain=False)
|
|
mqttc.publish(config.mqtt_topic_pir1, newState, qos=0, retain=False)
|
|
|
|
|
|
@@ -153,7 +153,7 @@ try:
|
|
elif serLine == "P4=H":
|
|
elif serLine == "P4=H":
|
|
newState = "ON"
|
|
newState = "ON"
|
|
|
|
|
|
- if newState is not None and lastState_pir2 != newState:
|
|
|
|
|
|
+ if newState is not None and (lastState_pir2 != newState or not filterUnchanged):
|
|
lastState_pir2 = newState
|
|
lastState_pir2 = newState
|
|
mqttc.publish(config.mqtt_topic_pir2, newState, qos=0, retain=False)
|
|
mqttc.publish(config.mqtt_topic_pir2, newState, qos=0, retain=False)
|
|
|
|
|