Procházet zdrojové kódy

追加事件类型推送内容

peng před 2 roky
rodič
revize
0ea998da54
1 změnil soubory, kde provedl 16 přidání a 0 odebrání
  1. 16 0
      Service/DevicePushService.py

+ 16 - 0
Service/DevicePushService.py

@@ -363,6 +363,14 @@ class DevicePushService:
                     msg_type = '区域离开'
                 elif event_type == 64:
                     msg_type = '区域闯入'
+                elif event_type == 4:
+                    msg_type = '有包裹出现'
+                elif event_type == 3:
+                    msg_type = '有车出现'
+                elif event_type == 2:
+                    msg_type = '有宠物出现'
+                elif event_type == 1:
+                    msg_type = '有人出现'
             if is_sys:
                 if device_type in MULTI_CHANNEL_TYPE_LIST:
                     send_text = '{} 通道:{}'.format(msg_type, channel)
@@ -397,6 +405,14 @@ class DevicePushService:
                     msg_type = 'Area departure'
                 elif event_type == 64:
                     msg_type = 'Area break-in'
+                elif event_type == 4:
+                    msg_type = 'Package detected'
+                elif event_type == 3:
+                    msg_type = 'Vehicle detected'
+                elif event_type == 2:
+                    msg_type = 'Pet detected'
+                elif event_type == 1:
+                    msg_type = 'Person detected'
             if is_sys:
                 if device_type in MULTI_CHANNEL_TYPE_LIST:
                     send_text = '{} channel:{}'.format(msg_type, channel)