zewelor / bt-mqtt-gateway

A simple Python script which provides a Bluetooth to MQTT gateway, easily extensible via custom workers. See https://github.com/zewelor/bt-mqtt-gateway/wiki for more information.
MIT License
548 stars 116 forks source link

fix unknown device name in command message #150

Closed hechi closed 4 years ago

hechi commented 4 years ago

Description

Device names are retrieved by the configuration file. If an MQTT command is handled but contains an unknown device name, which is not in the configuration file a KeyError was thrown and the application was terminated. This commit checks if the device name is known, if not it logs an error message but will not fail.

Fixes KeyError exception #53

Type of change

zewelor commented 4 years ago

I think it sounds reasonable, lets try this, thanks.

hechi commented 4 years ago

Super :) thx