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

Add support for Petlibro camera pet feeder.

Issue #759
Jason Rumney пре 2 година
родитељ
комит
ffa169695b
3 измењених фајлова са 256 додато и 0 уклоњено
  1. 1 0
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 254 0
      custom_components/tuya_local/devices/petlibro_camera_feeder.yaml

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -281,3 +281,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [cramer52](https://github.com/cramer52) for contributing support for Galaxy Projectors.
 - [kajapa](https://github.com/kajapa) for contributing support for Proscenic A8 air purifiers.
 - [Pagi13](https://github.com/Pagi13) for assisting with support for DTS238-7 smart meters.
+- [kshepard339](https://github.com/kshepard339) for assisting with support for Petlibro pet feeder with camera.

+ 1 - 0
DEVICES.md

@@ -381,6 +381,7 @@ of device.
 - Konlen/Rockson WF96L water level controller
 - Nedis pet feeder
 - Nedis WIFISA10CWT air quality monitor
+- Petlibro PLAF203 camera pet feeder
 - PGST PA-010 indoor temperature and humidity sensor
 - PH-W218 water quality monitor
 - Rojeco PTM-001 pet feeder

+ 254 - 0
custom_components/tuya_local/devices/petlibro_camera_feeder.yaml

@@ -0,0 +1,254 @@
+name: Pet feeder
+products:
+  - id: e1zs835joz1lc85q
+    name: Petlibro PLAF203
+primary_entity:
+  entity: sensor
+  name: Status
+  icon: "mdi:paw"
+  dps:
+    - id: 233
+      type: string
+      name: sensor
+    - id: 231
+      type: hex
+      name: schedule
+    - id: 236
+      type: bitfield
+      name: fault_code
+    - id: 237
+      type: string
+      name: planned_feed_report
+    - id: 247
+      type: string
+      name: manual_feed_report
+secondary_entities:
+  - entity: switch
+    name: Indicator
+    category: config
+    icon: "mdi:led-on"
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+  - entity: switch
+    name: Flip
+    icon: "mdi:flip-horizontal"
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+  - entity: select
+    name: Nightvision
+    icon: "mdi:weather-night"
+    category: config
+    dps:
+      - id: 108
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Auto
+          - dps_val: "1"
+            value: "Off"
+          - dps_val: "2"
+            value: "On"
+  - entity: button
+    name: Memory card format
+    icon: "mdi:micro-sd"
+    category: config
+    dps:
+      - id: 111
+        type: boolean
+        name: button
+      - id: 110
+        type: integer
+        name: status
+      - id: 109
+        type: string
+        name: capacity
+      - id: 117
+        type: integer
+        name: format_state
+  - entity: camera
+    name: Camera
+    dps:
+      - id: 105
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: false
+            value: true
+          - dps_val: true
+            value: false
+      - id: 113
+        type: boolean
+        name: motion_enable
+        optional: true
+      - id: 115
+        type: base64
+        name: snapshot
+        optional: true
+      - id: 150
+        type: boolean
+        name: record
+  - entity: switch
+    name: Motion detection
+    icon: "mdi:motion-sensor"
+    category: config
+    dps:
+      - id: 134
+        type: boolean
+        name: switch
+  - entity: select
+    name: Motion sensitivity
+    icon: "mdi:motion-sensor"
+    category: config
+    dps:
+      - id: 106
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Low
+          - dps_val: "1"
+            value: Medium
+          - dps_val: "2"
+            value: High
+  - entity: switch
+    name: Sound detection
+    icon: "mdi:ear-hearing"
+    category: config
+    dps:
+      - id: 139
+        type: boolean
+        name: switch
+  - entity: select
+    name: Sound sensitivity
+    icon: "mdi:ear-hearing"
+    category: config
+    dps:
+      - id: 140
+        type: string
+        name: option
+        mapping:
+          - dps_val: "0"
+            value: Low
+          - dps_val: "1"
+            value: High
+  - entity: select
+    name: Recording mode
+    icon: "mdi:video"
+    category: config
+    dps:
+      - id: 151
+        type: string
+        name: option
+        mapping:
+          - dps_val: "1"
+            value: Event
+          - dps_val: "2"
+            value: Continuous
+  - entity: number
+    name: Manual feed
+    category: config
+    icon: "mdi:food-drumstick"
+    dps:
+      - id: 232
+        type: integer
+        name: value
+        optional: true
+        range:
+          min: 0
+          max: 50
+        persist: false
+        mapping:
+          - dps_val: null
+            value: 0
+  - entity: sensor
+    name: Battery
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 235
+        type: integer
+        name: sensor
+        unit: "%"
+        class: measurement
+  - entity: binary_sensor
+    name: Food empty
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 236
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 1
+            value: true
+          - value: false
+  - entity: binary_sensor
+    name: Blocked
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 236
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 2
+            value: true
+          - value: false
+  - entity: binary_sensor
+    name: Battery
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 236
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 8
+            value: true
+          - value: false
+  - entity: number
+    name: Voice playback times
+    category: config
+    icon: "mdi:account-voice"
+    dps:
+      - id: 238
+        type: integer
+        name: value
+        range:
+          min: 0
+          max: 10
+      - id: 239
+        type: string
+        name: operation
+      - id: 240
+        type: string
+        name: voice
+      - id: 242
+        type: string
+        name: status
+      - id: 248
+        type: string
+        name: filename
+        optional: true
+  - entity: sensor
+    name: Food level
+    category: diagnostic
+    dps:
+      - id: 241
+        type: string
+        name: sensor
+  - entity: switch
+    name: Log
+    icon: "mdi:text-box-multiple-outline"
+    category: config
+    dps:
+      - id: 244
+        type: boolean
+        name: switch
+