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

Ti Pro25 Smart Cat Litter Box (#5585)

* first version of Ti Pro25 cat litter box

* full bin sensor and setting and removed a couple of settings that seemd internal

* fixed measurmenet warning

* Added one more config and a bit of cleaning related to the full bin

* update icon

* line too long

* fixed missing translation_key

* use translation key instead of name

* add better description for status

* add better description for status

* display weight depending on the selected unit

* add better labels for status

* update comments

* remove punctuation from name

* comment out the mapping

* added mapping back and revert sensor name

* remove sensor class that prevents unit and weight from changing

* add class back to weight sensor

---------

Co-authored-by: Claudiu Persoiu <claudiu.persoiu@happening.xyz>
Claudiu Persoiu 1 день назад
Родитель
Сommit
a5fce7a0a3
1 измененных файлов с 278 добавлено и 0 удалено
  1. 278 0
      custom_components/tuya_local/devices/ti_pro25_catlitterbox.yaml

+ 278 - 0
custom_components/tuya_local/devices/ti_pro25_catlitterbox.yaml

@@ -0,0 +1,278 @@
+## Ti Pro25 Smart Cat Litter Box also fund as iHunt Smart Cat Litter V1
+## dps that are not mapped
+## 109 - odor removal, seems to be internal
+## 110 - sleep mode, seems to be internal for schedule
+## 106, 107, 108 # autocleaning with schedule
+## 112, 119, 121, 122, 128, 129
+## 115 - calibration could not find a button in the app
+
+name: Cat litter box
+products:
+  - id: yn6wqmizg7abe5k8
+    manufacturer: Ti
+    model: Ti Pro25 Smart Cat Litter Box
+entities:
+  # Last recorded cat weight
+  - entity: sensor
+    icon: "mdi:cat"
+    name: Cat weight
+    class: weight
+    dps:
+      - id: 6
+        type: integer
+        name: sensor
+        class: measurement
+        mapping:
+          - scale: 10
+            constraint: unit
+            conditions:
+              - dps_val: kilogram
+                value_redirect: weight_lb
+      - id: 116
+        type: string
+        name: unit
+        mapping:
+          - dps_val: kilogram
+            value: lb
+          - dps_val: pound
+            value: kg
+      - id: 134
+        type: integer
+        name: weight_lb
+        mapping:
+          - scale: 10
+  # Counts total number of cat visits
+  - entity: sensor
+    name: Total visits
+    icon: "mdi:counter"
+    dps:
+      - id: 7
+        type: integer
+        name: sensor
+        unit: visits
+  # Duration of cat's last visit in seconds
+  - entity: sensor
+    name: Visit duration
+    class: duration
+    dps:
+      - id: 8
+        type: integer
+        name: sensor
+        unit: s
+        class: measurement
+  # Reports device malfunctions and errors
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 22
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 22
+        type: bitfield
+        name: fault_code
+      - id: 22
+        type: bitfield
+        name: description
+        mapping:
+          - dps_val: 1
+            value: "Motor malfunction"
+          - dps_val: 2
+            value: "Program error"
+          - dps_val: 4
+            value: "Weight sensor malfunction"
+          - dps_val: 8
+            value: "Fan malfunction"
+          - dps_val: 16
+            value: "Ozone generator malfunction"
+          - dps_val: 32
+            value: "Ball bunker not installed"
+  - entity: sensor
+    translation_key: status
+    class: enum
+    category: diagnostic
+    dps:
+      - id: 24
+        type: string
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: "standly"
+            value: "standby"
+          - dps_val: "clean"
+            value: "cleaning"
+          - dps_val: "empty"
+            value: "emptying litter"
+          - dps_val: "clock"
+            value: "child lock"
+          - dps_val: "sleep"
+            value: "sleep mode"
+          - dps_val: "level"
+            value: "smoothing"
+          - dps_val: "test"
+            value: "self check"
+          - dps_val: "replace"
+            value: "replacing bag"
+  - entity: button
+    name: Clean
+    icon: "mdi:shimmer"
+    dps:
+      - id: 101
+        type: boolean
+        name: button
+  - entity: button
+    name: Empty
+    icon: "mdi:delete-empty"
+    dps:
+      - id: 102
+        type: boolean
+        name: button
+  - entity: binary_sensor
+    name: Bin full
+    icon: "mdi:trash-can"
+    translation_key: tank_full
+    dps:
+      - id: 103
+        type: boolean
+        optional: true
+        name: sensor
+        mapping:
+          - dps_val: null
+            value: false
+  - entity: binary_sensor
+    class: occupancy
+    icon: "mdi:motion-sensor"
+    dps:
+      - id: 104
+        type: boolean
+        name: sensor
+  - entity: switch
+    translation_key: auto_clean
+    category: config
+    dps:
+      - id: 105
+        type: boolean
+        name: switch
+  ## In the event of a malfunction where the silo is not in its home position,
+  ## perform a power-cycle operation (powering the equipment off and then on);
+  ## this operation bypasses any triggered sensors and is executed while
+  ## the system is connected to the network.
+  - entity: button
+    name: Device restart
+    dps:
+      - id: 113
+        type: boolean
+        name: button
+  - entity: lock
+    translation_key: child_lock
+    category: config
+    dps:
+      - id: 114
+        type: boolean
+        name: lock
+  - entity: select
+    name: Unit
+    category: config
+    icon: "mdi:dots-hexagon"
+    dps:
+      - id: 116
+        type: string
+        name: option
+        mapping:
+          - dps_val: "pound"
+            value: "kilogram"
+          - dps_val: "kilogram"
+            value: "pound"
+  - entity: number
+    name: Clean wait time
+    category: config
+    class: duration
+    icon: "mdi:timer"
+    dps:
+      - id: 117
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 60
+  - entity: number
+    name: Clean interval
+    category: config
+    icon: "mdi:update"
+    dps:
+      - id: 118
+        type: integer
+        name: value
+        unit: min
+        range:
+          min: 0
+          max: 120
+  - entity: number
+    name: Bin Full Calibration
+    category: config
+    icon: "mdi:delete-restore"
+    dps:
+      - id: 123
+        type: integer
+        name: value
+        unit: cleanings
+        range:
+          min: 15
+          max: 35
+  - entity: sensor
+    icon: "mdi:delete-restore"
+    name: Number of cleanings
+    dps:
+      - id: 124
+        type: integer
+        name: sensor
+        unit: cleanings
+        class: measurement
+  - entity: switch
+    name: Deep clean
+    category: config
+    icon: "mdi:shimmer"
+    dps:
+      - id: 125
+        type: boolean
+        name: switch
+  - entity: button
+    name: Level litter
+    icon: "mdi:arrow-collapse-down"
+    dps:
+      - id: 126
+        type: boolean
+        name: button
+  - entity: button
+    name: Bag replace
+    icon: "mdi:sack"
+    dps:
+      - id: 127
+        type: boolean
+        name: button
+  - entity: switch
+    name: Odor removal after cleaning
+    category: config
+    icon: "mdi:flower"
+    dps:
+      - id: 129
+        type: boolean
+        name: switch
+  - entity: select
+    name: Litter type
+    category: config
+    icon: "mdi:dots-hexagon"
+    dps:
+      - id: 131
+        type: string
+        name: option
+        mapping:
+          - dps_val: "mineral_cat_litter"
+            value: "Mineral"
+          - dps_val: "mix_cat_litter"
+            value: "Mixed"