Skip to content

Commit c985d61

Browse files
fix: avoid to add a belief each time a no presence activity is detected if already known
1 parent 5c747e9 commit c985d61

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/agt/powerSaver.asl

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
+presence(RoomId, RoomType, PresenceDetected)
3030
: PresenceDetected == false &
3131
nticks(CurrentMillisecond) &
32-
minutesToStandby(RoomType, MinutesToStandby)
32+
minutesToStandby(RoomType, MinutesToStandby) &
33+
not no_presence(RoomId, RoomType, X, Y) // Check that it isn't already known
3334
<- +no_presence(RoomId, RoomType, CurrentMillisecond, MinutesToStandby * 60 * 1000).
3435

3536
@presence [atomic]

0 commit comments

Comments
 (0)