Skip to content

Commit

Permalink
Merge pull request #66 from merdely/master
Browse files Browse the repository at this point in the history
fix notify typo
  • Loading branch information
raetha authored Mar 31, 2022
2 parents 944f916 + 2f7a37a commit 0df4056
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wyzesense2mqtt/wyzesense.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Packet(object):
# Notifications initiated from dongle side
NOTIFY_SENSOR_ALARM = MAKE_CMD(TYPE_ASYNC, 0x19)
NOTIFY_SENSOR_SCAN = MAKE_CMD(TYPE_ASYNC, 0x20)
NOITFY_SYNC_TIME = MAKE_CMD(TYPE_ASYNC, 0x32)
NOTIFY_SYNC_TIME = MAKE_CMD(TYPE_ASYNC, 0x32)
NOTIFY_EVENT_LOG = MAKE_CMD(TYPE_ASYNC, 0x35)

def __init__(self, cmd, payload=bytes()):
Expand Down Expand Up @@ -217,7 +217,7 @@ def Ch554Upgrade(cls):

@classmethod
def SyncTimeAck(cls):
return cls(cls.NOITFY_SYNC_TIME + 1, struct.pack(">Q", int(time.time() * 1000)))
return cls(cls.NOTIFY_SYNC_TIME + 1, struct.pack(">Q", int(time.time() * 1000)))

@classmethod
def AsyncAck(cls, cmd):
Expand Down Expand Up @@ -314,7 +314,7 @@ def __init__(self, device, event_handler):
self.__on_event = event_handler

self.__handlers = {
Packet.NOITFY_SYNC_TIME: self._OnSyncTime,
Packet.NOTIFY_SYNC_TIME: self._OnSyncTime,
Packet.NOTIFY_SENSOR_ALARM: self._OnSensorAlarm,
Packet.NOTIFY_EVENT_LOG: self._OnEventLog,
}
Expand Down

0 comments on commit 0df4056

Please sign in to comment.