Просмотр исходного кода

Moebot: mark optional dps, change password to integer

Original config was based on info from another project, but string/integer
distinction wasn't clear, and it wasn't obvious which dps were always
returned, and which were optional.  Now we have a log message we can refine
things so the device can be matched (seems to require explicit protocol
version setting of 3.4).

Issue #573
Jason Rumney 2 лет назад
Родитель
Сommit
21bb951e29
2 измененных файлов с 10 добавлено и 2 удалено
  1. 1 1
      DEVICES.md
  2. 9 1
      custom_components/tuya_local/devices/moebot_s_mower.yaml

+ 1 - 1
DEVICES.md

@@ -308,7 +308,7 @@ of device.
 
 
 ### Lawnmowers
 ### Lawnmowers
 
 
-- MoeBot S-series mowers
+- MoeBot S-series mowers (may require protocol version set manually to 3.4)
 
 
 ### Locks
 ### Locks
 
 

+ 9 - 1
custom_components/tuya_local/devices/moebot_s_mower.yaml

@@ -36,6 +36,7 @@ primary_entity:
     - id: 115
     - id: 115
       name: command
       name: command
       type: string
       type: string
+      optional: true
       mapping:
       mapping:
         - dps_val: StartMowing
         - dps_val: StartMowing
           value: start
           value: start
@@ -55,20 +56,24 @@ primary_entity:
           value: OK
           value: OK
       # out_of_bounds, lifted, tilted, overturned, trapped, signal lost, motor fault, overheated, battery damaged
       # out_of_bounds, lifted, tilted, overturned, trapped, signal lost, motor fault, overheated, battery damaged
     - id: 106
     - id: 106
-      type: string
+      type: integer
       name: password
       name: password
     - id: 110
     - id: 110
       type: string
       type: string
       name: schedule
       name: schedule
+      optional: true
     - id: 111
     - id: 111
       type: string
       type: string
       name: error_log
       name: error_log
+      optional: true
     - id: 112
     - id: 112
       type: string
       type: string
       name: work_log
       name: work_log
+      optional: true
     - id: 113
     - id: 113
       type: string
       type: string
       name: zones
       name: zones
+      optional: true
     - id: 114
     - id: 114
       type: string
       type: string
       name: auto_mode
       name: auto_mode
@@ -144,6 +149,7 @@ secondary_entities:
       - id: 107
       - id: 107
         type: boolean
         type: boolean
         name: button
         name: button
+        optional: true
   - entity: button
   - entity: button
     name: Query schedule
     name: Query schedule
     icon: "mdi:calendar-refresh"
     icon: "mdi:calendar-refresh"
@@ -152,6 +158,7 @@ secondary_entities:
       - id: 108
       - id: 108
         type: boolean
         type: boolean
         name: button
         name: button
+        optional: true
   - entity: button
   - entity: button
     name: Query zones
     name: Query zones
     icon: "mdi:map-search"
     icon: "mdi:map-search"
@@ -160,3 +167,4 @@ secondary_entities:
       - id: 109
       - id: 109
         type: boolean
         type: boolean
         name: button
         name: button
+        optional: true