Readme change
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
# Aqara-MQTT
|
# Aqara-MQTT
|
||||||
[](https://travis-ci.org/monster1025/aqara-mqtt)
|
[](https://travis-ci.org/monster1025/aqara-mqtt)
|
||||||
|
|
||||||
Aqara (Xiaomi) Gateway to MQTT bridge.
|
Aqara (Xiaomi) Gateway to MQTT bridge.
|
||||||
I use it for home assistant integration and it works well now.
|
I use it for home assistant integration and it works well now.
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -55,7 +55,7 @@ def read_motion_data(gateway, client, polling_interval, polling_models, stop_eve
|
|||||||
data = json.loads(sensor_resp['data'])
|
data = json.loads(sensor_resp['data'])
|
||||||
state = data.get("status", None)
|
state = data.get("status", None)
|
||||||
short_id = sensor_resp['short_id']
|
short_id = sensor_resp['short_id']
|
||||||
if ( device['data'] != data or first):
|
if device['data'] != data or first:
|
||||||
device['data'] = data
|
device['data'] = data
|
||||||
_LOGGER.debug("Polling result differs for " + str(model) + " with sid(First: " + str(first) + "): " + str(sid) + "; " + str(data))
|
_LOGGER.debug("Polling result differs for " + str(model) + " with sid(First: " + str(first) + "): " + str(sid) + "; " + str(data))
|
||||||
client.publish(model, sid, data)
|
client.publish(model, sid, data)
|
||||||
|
|||||||
@@ -88,9 +88,6 @@ class XiaomiHub:
|
|||||||
resp = self._send_cmd(cmd, "read_ack")
|
resp = self._send_cmd(cmd, "read_ack")
|
||||||
model = resp["model"]
|
model = resp["model"]
|
||||||
|
|
||||||
if model == '':
|
|
||||||
model = 'cube'
|
|
||||||
|
|
||||||
xiaomi_device = {
|
xiaomi_device = {
|
||||||
"model":model,
|
"model":model,
|
||||||
"sid":resp["sid"],
|
"sid":resp["sid"],
|
||||||
|
|||||||
Reference in New Issue
Block a user