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

Add support for myQ TD8 video doorbell

- add translation_key `wake` for binary sensor, to indicate Awake/Sleep states.

Issue #1812
Jason Rumney 1 год назад
Родитель
Сommit
f6245ff4d5

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -691,3 +691,4 @@ Further device support has been made with the assistance of users. Please consid
 - [death-droid](https://github.com/death-droid) for contributing improvements to the water_heater platform.
 - [79chrisone](https://github.com/79chrisone) for contributing basic support for EARU DPN circuit breaker.
 - [sorrison](https://github.com/sorrison) for contributing improvements to Sanden heat pump.
+- [OsaedYahya](https://github.com/OsaedYahya) for contributing support for MyQ TD8 vide doorbell.

+ 1 - 0
DEVICES.md

@@ -687,6 +687,7 @@ work reliably, even if listed below.
 - Cleverio CD200 video doorbell
 - Iebeyond ECH doorbell with 433MHz RF hub
 - KW02 video doorbell
+- MyQ TD8 video doorbell
 - WHM-04 doorbell (sold under various brands)
 
 ### Cameras

+ 159 - 0
custom_components/tuya_local/devices/myq_td8_videodoorbell.yaml

@@ -0,0 +1,159 @@
+name: Video doorbell
+products:
+  - id: wih9ybttb42lxb1q
+    name: myQ TD8
+primary_entity:
+  entity: camera
+  dps:
+    - id: 154
+      name: snapshot
+      type: base64
+      optional: true
+      persist: false
+      sensitive: true
+      mapping:
+        - dps_val: null
+          value_redirect: movement_pic
+    - id: 115
+      name: movement_pic
+      type: base64
+      optional: true
+      sensitive: true
+    - id: 134
+      name: motion_enable
+      type: boolean
+    - id: 150
+      name: record
+      type: boolean
+    - id: 152
+      name: pir_switch
+      type: string
+      optional: true
+      # enum: ["0", "1", "2", "3"] - probably a select, but meanings unknown
+secondary_entities:
+  - entity: light
+    translation_key: indicator
+    category: config
+    dps:
+      - id: 101
+        type: boolean
+        name: switch
+        optional: true
+  - entity: switch
+    name: Flip image
+    icon: "mdi:flip-horizontal"
+    category: config
+    dps:
+      - id: 103
+        type: boolean
+        name: switch
+        optional: true
+  - entity: sensor
+    name: SD status
+    category: diagnostic
+    icon: "mdi:micro-sd"
+    dps:
+      - id: 110
+        type: integer
+        name: sensor
+        optional: true
+      - id: 109
+        type: string
+        name: storage
+        optional: true
+  - entity: button
+    name: SD format
+    category: config
+    icon: "mdi:micro-sd"
+    dps:
+      - id: 111
+        type: boolean
+        name: button
+        optional: true
+      - id: 117
+        type: integer
+        name: sd_format_state
+        optional: true
+  - entity: siren
+    category: config
+    dps:
+      - id: 159
+        type: boolean
+        name: switch
+        optional: true
+      - id: 160
+        type: integer
+        optional: true
+        name: volume_level
+        range:
+          min: 1
+          max: 10
+        mapping:
+          - scale: 10
+  - entity: sensor
+    class: battery
+    category: diagnostic
+    dps:
+      - id: 145
+        type: integer
+        optional: true
+        name: sensor
+        unit: "%"
+        class: measurement
+      - id: 126
+        type: integer
+        optional: true
+        name: capacity
+        mapping:
+          - scale: 0.15
+      - id: 146
+        type: string
+        optional: true
+        name: powermode
+  - entity: number
+    name: Low power level
+    category: config
+    icon: "mdi:battery-20"
+    dps:
+      - id: 147
+        type: integer
+        optional: true
+        name: value
+        unit: "%"
+        range:
+          min: 10
+          max: 50
+  - entity: binary_sensor
+    translation_key: wake
+    category: diagnostic
+    dps:
+      - id: 149
+        type: boolean
+        optional: true
+        name: sensor
+  - entity: switch
+    name: Human filter
+    icon: "mdi:human"
+    category: config
+    dps:
+      - id: 170
+        type: boolean
+        name: switch
+        optional: true
+  - entity: event
+    class: doorbell
+    dps:
+      - id: 185
+        type: string
+        name: event
+        optional: true
+        mapping:
+          - dps_val: ""
+            value: null
+          - dps_val: null
+            value: null
+          - value: "ring"
+      - id: 185
+        type: string
+        name: message
+        optional: true

+ 6 - 0
custom_components/tuya_local/icons.json

@@ -18,6 +18,12 @@
                 "state": {
                     "on": "mdi:water-alert"
                 }
+            },
+            "wake": {
+                "default": "mdi:weather-sunny",
+                "state": {
+                    "off": "mdi:weather-night"
+                }
             }
         },
         "climate": {

+ 7 - 0
custom_components/tuya_local/translations/bg.json

@@ -122,6 +122,13 @@
                     "on": "Пълна"
                 }
             },
+            "wake": {
+                "name": "Събуждане",
+                "state": {
+                    "off": "Сън",
+                    "on": "Будене"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/cz.json

@@ -122,6 +122,13 @@
                     "on": "Plná"
                 }
             },
+            "wake": {
+                "name": "Probuzení",
+                "state": {
+                    "off": "Spí",
+                    "on": "Probuzený"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/de.json

@@ -122,6 +122,13 @@
                     "on": "Voll"
                 }
             },
+            "wake": {
+                "name": "Wake",
+                "state": {
+                    "off": "Schlafend",
+                    "on": "Wach"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/el.json

@@ -122,6 +122,13 @@
                     "on": "Γεμάτο"
                 }
             },
+            "wake": {
+                "name": "Ξύπνημα",
+                "state": {
+                    "off": "Αναμονή",
+                    "on": "Ξύπνημα"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/en.json

@@ -122,6 +122,13 @@
                     "on": "Full"
                 }
             },
+            "wake": {
+                "name": "Wake",
+                "state": {
+                    "off": "Sleeping",
+                    "on": "Awake"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/es.json

@@ -122,6 +122,13 @@
                     "on": "Lleno"
                 }
             },
+            "wake": {
+                "name": "Despertar",
+                "state": {
+                    "off": "Dormido",
+                    "on": "Despierto"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 8 - 1
custom_components/tuya_local/translations/fr.json

@@ -122,7 +122,14 @@
                     "on": "Pleine"
                 }
             },
-                        "casdon_oven_fault": {
+            "wake": {
+                "name": "Réveil",
+                "state": {
+                    "off": "Endormi",
+                    "on": "Réveillé"
+                }
+            },
+            "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {
                         "state": {

+ 7 - 0
custom_components/tuya_local/translations/hu.json

@@ -122,6 +122,13 @@
                     "on": "Teljes"
                 }
             },
+            "wake": {
+                "name": "Ébresztés",
+                "state": {
+                    "off": "Normál",
+                    "on": "Ébresztés"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/id.json

@@ -122,6 +122,13 @@
                     "on": "Penuh"
                 }
             },
+            "wake": {
+                "name": "Bangun",
+                "state": {
+                    "off": "Tidur",
+                    "on": "Bangun"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/it.json

@@ -122,6 +122,13 @@
                     "on": "Piena"
                 }
             },
+            "wake": {
+                "name": "Sveglia",
+                "state": {
+                    "off": "Spento",
+                    "on": "Acceso"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/ja.json

@@ -122,6 +122,13 @@
                     "on": "満杯"
                 }
             },
+            "wake": {
+                "name": "起床",
+                "state": {
+                    "off": "スリープ",
+                    "on": "起床"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/no-NB.json

@@ -122,6 +122,13 @@
                     "on": "Full"
                 }
             },
+            "wake": {
+                "name": "Våkne",
+                "state": {
+                    "off": "Søvn",
+                    "on": "Våken"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/pl.json

@@ -122,6 +122,13 @@
                     "on": "Pełny"
                 }
             },
+            "wake": {
+                "name": "Budzenie",
+                "state": {
+                    "off": "Naladowana",
+                    "on": "Budzenie"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/pt-BR.json

@@ -122,6 +122,13 @@
                     "on": "Cheio"
                 }
             },
+            "wake": {
+                "name": "Acordar",
+                "state": {
+                    "off": "Dormindo",
+                    "on": "Acordado"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/ru.json

@@ -122,6 +122,13 @@
                     "on": "Полный"
                 }
             },
+            "wake": {
+                "name": "Подъем",
+                "state": {
+                    "off": "Сон",
+                    "on": "Бодрствование"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/uk.json

@@ -122,6 +122,13 @@
                     "on": "Повний"
                 }
             },
+            "wake": {
+                "name": "Пробудження",
+                "state": {
+                    "off": "Сон",
+                    "on": "Будильник"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/ur.json

@@ -122,6 +122,13 @@
                     "on": "مکمل"
                 }
             },
+            "wake": {
+                "name": "جاگنا",
+                "state": {
+                    "off": "سو رہا ہے",
+                    "on": "جاگ رہا ہے"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/zh-Hans.json

@@ -122,6 +122,13 @@
                     "on": "满水"
                 }
             },
+            "wake": {
+                "name": "唤醒",
+                "state": {
+                    "off": "休眠",
+                    "on": "唤醒"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {

+ 7 - 0
custom_components/tuya_local/translations/zh-Hant.json

@@ -122,6 +122,13 @@
                     "on": "滿水"
                 }
             },
+            "wake": {
+                "name": "唤醒",
+                "state": {
+                    "off": "睡眠",
+                    "on": "唤醒"
+                }
+            },
             "casdon_oven_fault": {
                 "state_attributes": {
                     "fault_message": {