Преглед изворни кода

Moebot S: add commands and statuses from S5 docs

Previous values were based on apparently reverse engineered values
from another project.  iot.tuya.com docs for S5 provide some more
info.

Issue #1665
Jason Rumney пре 1 година
родитељ
комит
5c8a4a99a1
1 измењених фајлова са 96 додато и 18 уклоњено
  1. 96 18
      custom_components/tuya_local/devices/moebot_s_mower.yaml

+ 96 - 18
custom_components/tuya_local/devices/moebot_s_mower.yaml

@@ -31,6 +31,10 @@ primary_entity:
           value: mowing
         - dps_val: ERROR
           value: error
+        - dps_val: UPDATA
+          value: docked
+        - dps_val: SELF_TEST
+          value: docked
     - id: 115
       name: command
       type: string
@@ -46,6 +50,9 @@ primary_entity:
         - dps_val: CancelWork
           value: pause
           hidden: true
+        - dps_val: ContinueWork
+          value: start_mowing
+          hidden: true
         - dps_val: StartReturnStation
           value: dock
     - id: 101
@@ -75,10 +82,6 @@ primary_entity:
       type: string
       name: zones
       optional: true
-    - id: 114
-      type: string
-      name: auto_mode
-      optional: true
 secondary_entities:
   - entity: vacuum
     icon: "mdi:robot-mower"
@@ -128,7 +131,7 @@ secondary_entities:
     icon: "mdi:mower-on"
     dps:
       - id: 115
-        type: boolean
+        type: string
         name: button
         optional: true
         mapping:
@@ -139,12 +142,23 @@ secondary_entities:
     icon: "mdi:mower"
     dps:
       - id: 115
-        type: boolean
+        type: string
         name: button
         optional: true
         mapping:
           - dps_val: CancelWork
             value: true
+  - entity: button
+    name: Continue mowing
+    icon: "mdi:mower-on"
+    dps:
+      - id: 115
+        type: string
+        name: button
+        optional: true
+        mapping:
+          - dps_val: ContinueWork
+            value: true
   - entity: sensor
     class: battery
     dps:
@@ -183,24 +197,75 @@ secondary_entities:
           - dps_val: MOWER_LEAN
             value: Tilted
             icon: "mdi:angle-acute"
+          - dps_val: MOWER_STEEP
+            value: Steep
+            icon: "mdi:slope-uphill"
+          - dps_val: RAIN_PARK
+            value: Raining
+            icon: "mdi:weather-pouring"
+          - dps_val: BATTERY_NOT_ENOUGH
+            value: Low battery
+            icon: "mdi:battery-low"
+          - dps_val: NO_LOOP_SIGNAL
+            value: Weak signal
+            icon: "mdi:signal-cellular-1"
+          - dps_val: CLOSE_TOPCOVER
+            value: Close top cover
+            icon: "mdi:door-open"
+          - dps_val: MOWER_IN_STATION
+            value: Docked
+            icon: "mdi:mower"
+          - dps_val: MOWER_OUT_STATION
+            value: Undocked
+            icon: "mdi:mower-on"
+          - dps_val: PLACE_INSIDE_STATION
+            value: Manually dock
+            icon: "mdi:home-alert"
+          - dps_val: FIXED_END
+            value: Finished fixed mowing
+            icon: "mdi:mower"
+          - dps_val: CHARGING_DISCONNECT
+            value: Disconnected
+            icon: "mdi:power-plug-battery"
+          - dps_val: CHARGING_PAUSE
+            value: Paused charging
+            icon: "mdi:battery-clock"
+          - dps_val: WORK_INTERRUPT
+            value: Interrupted
+            icon: "mdi:alert-octogon"
+          - dps_val: FIXED_MOWING_INTERRUPT
+            value: Interrupted fixed mowing
+            icon: "mdi:alert-octogon"
+          - dps_val: TURN_ON_BUTTON
+            value: Turn on button
+            icon: "mdi:button-pointer"
+          - dps_val: PRESS_START_KEY
+            value: Press start
+            icon: "mdi:play"
+          - dps_val: TIMESET_30MIN
+            value: Set 30 minute timer
+            icon: "mdi:fast-forward-30"
+          - dps_val: TIMESET_UNLEGAL
+            value: Invalid timer
+            icon: "mdi:timer-alert"
+          - dps_val: CHARGR_CURRENT_LOW
+            value: Charging current low
+            icon: "mdi:flash-alert"
+          - dps_val: RAIN_OUT_STATION
+            value: Caught in rain
+            icon: "mdi:weather-pouring"
+          - dps_val: UPDATA_FAIL
+            value: Data upload failure
+            icon: "mdi:cloud-alert"
+          - dps_val: CONTINUE_TOOLTIP
+            value: Continue
+            icon: "mdi:step-forward"
           - dps_val: MOWER_EMERGENCY
             value: Stopped
             icon: "mdi:octagon"
           - dps_val: MOWER_UI_LOCKED
             value: UI locked
             icon: "mdi:hand-back-right-off"
-          - dps_val: NO_LOOP_SIGNAL
-            value: Weak signal
-            icon: "mdi:signal-cellular-1"
-          - dps_val: BATTERY_NOT_ENOUGH
-            value: Low battery
-            icon: "mdi:battery-low"
-          - dps_val: CHARGING_PAUSE
-            value: Charging interrupted
-            icon: "mdi:battery-alert"
-          - dps_val: RAIN_PARK
-            value: Raining
-            icon: "mdi:weather-pouring"
   - entity: switch
     name: Rain mode
     icon: "mdi:weather-pouring"
@@ -248,3 +313,16 @@ secondary_entities:
         type: boolean
         name: button
         optional: true
+  - entity: select
+    name: Mowing mode
+    icon: "mdi:mower"
+    category: config
+    dps:
+      - id: 114
+        type: string
+        name: option
+        mapping:
+          - dps_val: AutoMode
+            value: Auto
+          - dps_val: GardenMode
+            value: Garden