Skip to content

Commit

Permalink
Merge pull request #57 from Tobix99/master
Browse files Browse the repository at this point in the history
fixed wrong path selection in MQTT
  • Loading branch information
seydx authored Nov 9, 2020
2 parents c03bbe0 + 7692bcd commit 11d09e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helper/handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class Handler {
active = path[1] != 'reset';
}

switch (path[0]) {
// switch over last element in path array
switch (path[path.length-1]) {
case 'motion':
Logger.debug('Motion event triggered.');
return this.motionHandler(accessory, active);
Expand Down

0 comments on commit 11d09e4

Please sign in to comment.