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

feat (devices): add PNI Safe House Smart Gas 300 alarm

Issue #4381
Jason Rumney 5 дней назад
Родитель
Сommit
b9608df0be
3 измененных файлов с 81 добавлено и 1 удалено
  1. 1 1
      ACKNOWLEDGEMENTS.md
  2. 1 0
      DEVICES.md
  3. 79 0
      custom_components/tuya_local/devices/pni_gas_alarm.yaml

+ 1 - 1
ACKNOWLEDGEMENTS.md

@@ -950,7 +950,7 @@ Further device support has been made with the assistance of users. Please consid
 - [danvit58](https://github.com/danvit58) for assisting with support for Konlen SNT957W-TDE E3S temperature alarm.
 - [danvit58](https://github.com/danvit58) for assisting with support for Konlen SNT957W-TDE E3S temperature alarm.
 - [Gotanius](https://github.com/Gotanius) for contributing support for PetsPride OO15 pet feeder.
 - [Gotanius](https://github.com/Gotanius) for contributing support for PetsPride OO15 pet feeder.
 - [eliel-elie](https://github.com/eliel-elie) for contributing support for Zemismart SMD02T-TZ energy meter.
 - [eliel-elie](https://github.com/eliel-elie) for contributing support for Zemismart SMD02T-TZ energy meter.
-- [justme871](https://github.com/justme871) for assisting with support for Garza thermostat.
+- [justme871](https://github.com/justme871) for assisting with support for Garza thermostat, PNI Safe House Smart Gas 300 alarm.
 - [jaso1000](https://github.com/jaso1000) for contributing support for Temple and Webster Alina ceiling fan.
 - [jaso1000](https://github.com/jaso1000) for contributing support for Temple and Webster Alina ceiling fan.
 - [hprombex](https://github.com/hprombex) for contributing support for Götze and Jensen KT975K kettle.
 - [hprombex](https://github.com/hprombex) for contributing support for Götze and Jensen KT975K kettle.
 - [Anzic23](https://github.com/Anzic23) for contributing support for Tary TA-AC380/22 EV charger.
 - [Anzic23](https://github.com/Anzic23) for contributing support for Tary TA-AC380/22 EV charger.

+ 1 - 0
DEVICES.md

@@ -1217,6 +1217,7 @@ port and password.
 - PH-W218 water quality monitor
 - PH-W218 water quality monitor
 - Pinjia PJ3101A presence sensor
 - Pinjia PJ3101A presence sensor
 - PlantsIO Ivy smart planter
 - PlantsIO Ivy smart planter
+- PNI Sofe House Smart Gas 300 alarm
 - Prodotec PT02 air quality monitor
 - Prodotec PT02 air quality monitor
 - Protmex PT-19DW alarm clock with temperature and humidity monitor
 - Protmex PT-19DW alarm clock with temperature and humidity monitor
 - PTH9BW air quality monitor
 - PTH9BW air quality monitor

+ 79 - 0
custom_components/tuya_local/devices/pni_gas_alarm.yaml

@@ -0,0 +1,79 @@
+name: Gas alarm
+products:
+  - id: ryukfg7yx3zwh3f8
+    manufacturer: PNI
+    model: Safe House Smart Gas 300
+entities:
+  - entity: binary_sensor
+    class: gas
+    category: diagnostic
+    dps:
+      - id: 2
+        type: string
+        name: sensor
+        mapping:
+          - dps_val: alarm
+            value: true
+          - value: false
+  - entity: sensor
+    class: volatile_organic_compounds_parts
+    name: Gas
+    category: diagnostic
+    dps:
+      - id: 5
+        type: integer
+        name: sensor
+        unit: ppm
+        class: measurement
+        mapping:
+          - scale: 10
+  - entity: button
+    name: Self check
+    category: config
+    dps:
+      - id: 9
+        type: boolean
+        name: button
+      - id: 1
+        type: string
+        name: result
+  - entity: binary_sensor
+    class: cold
+    name: Preheat
+    category: diagnostic
+    dps:
+      - id: 10
+        type: boolean
+        name: sensor
+  - entity: switch
+    name: Alarm
+    category: config
+    dps:
+      - id: 12
+        type: boolean
+        name: switch
+  - entity: switch
+    translation_key: sound
+    dps:
+      - id: 14
+        type: boolean
+        name: switch
+        mapping:
+          - dps_val: false
+            value: true
+          - dps_val: true
+            value: false
+  - entity: binary_sensor
+    class: problem
+    category: diagnostic
+    dps:
+      - id: 45
+        type: bitfield
+        name: sensor
+        mapping:
+          - dps_val: 0
+            value: false
+          - value: true
+      - id: 45
+        type: bitfield
+        name: fault_code