Skip to content

Commit

Permalink
Resolve another logic error for known device alerting for Kismet.
Browse files Browse the repository at this point in the history
  • Loading branch information
btsimon97 committed Apr 9, 2021
1 parent 02e90c6 commit c44e92c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bluemon-kismet.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async def process_message(message_json):
else:
alert_message = "Zone " + zones.get(zone, 'zone_name') + " detected an unknown BTLE device with Name: " \
+ device_name + " and MAC: " + device_mac
elif zones.getboolean(zone, 'alert_on_recognized'):
elif zones.getboolean(zone, 'alert_on_recognized') and device_known:
alert_message = "Zone " + zones.get(zone, 'zone_name') + " detected known BTLE device " + device_nickname \
+ " (" + device_mac + ")"

Expand Down Expand Up @@ -152,7 +152,7 @@ async def process_message(message_json):
else:
alert_message = "Zone " + zones.get(zone, 'zone_name') + " detected an unknown BT device with Name: " \
+ device_name + " and MAC: " + device_mac
elif zones.getboolean(zone, 'alert_on_recognized'):
elif zones.getboolean(zone, 'alert_on_recognized') and device_known:
alert_message = "Zone " + zones.get(zone, 'zone_name') + " detected known BT device " + device_nickname \
+ " (" + device_mac + ")"

Expand Down

0 comments on commit c44e92c

Please sign in to comment.