update
This commit is contained in:
parent
8b4d7653ca
commit
c02e314338
4
MQTT.py
4
MQTT.py
|
@ -23,9 +23,7 @@ def valid(msg, client):
|
||||||
if 'device_name' not in origin_data:
|
if 'device_name' not in origin_data:
|
||||||
client.publish('error', payload='device_name must be supplied', qos=0)
|
client.publish('error', payload='device_name must be supplied', qos=0)
|
||||||
return False
|
return False
|
||||||
client.publish('error', payload=origin_data['device_name'], qos=0)
|
if origin_data['device_name'] != device_name:
|
||||||
client.publish('error', payload=device_name, qos=0)
|
|
||||||
if origin_data['device_name'] != 'test':
|
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue