Skip to content

Commit 809a4e3

Browse files
committed
Changed event limiting for generic controllers
Limiting events on generic controllers based on their instanceId
1 parent 7ed31f4 commit 809a4e3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/SinricProDevice.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ bool SinricProDevice::sendEvent(JsonDocument& event) {
8080
return false;
8181
}
8282
String eventName = event["payload"]["action"] | ""; // get event name
83-
83+
String eventInstance = event["payload"]["instanceId"] | "";
84+
if (eventInstance != "") eventName += "_" + eventInstance;
85+
8486
LeakyBucket_t bucket; // leaky bucket algorithm is used to prevent flooding the server
8587

8688
// get leaky bucket for event from eventFilter

0 commit comments

Comments
 (0)