瀏覽代碼

Breville purifiers: adapt to HA conventions.

- only capitalise first word of entity names (highlighted when they
  changed the naming API last year)
- avoid dynamic icons that don't really add value (these interfere
  with theming and user customization)
- merge mode into fan as preset_mode.  Apparently this clutters the
  HomeKit interface, but that would seem a bug better addressed in the
  HomeKit integration.
Jason Rumney 3 年之前
父節點
當前提交
571efda5c1

+ 1 - 0
ACKNOWLEDGEMENTS.md

@@ -199,3 +199,4 @@ Further device support has been made with the assistance of users.  Please consi
 - [Codeazure](https://github.com/Codeazure) for assisting with support for 4-way power monitoring powerstrips (via Kogan 3-way + USB powerstrip).
 - [Codeazure](https://github.com/Codeazure) for assisting with support for 4-way power monitoring powerstrips (via Kogan 3-way + USB powerstrip).
 - [hebenon](https://github.com/hebenon) for contributing support for Breville Smart Air Connect purifiers.
 - [hebenon](https://github.com/hebenon) for contributing support for Breville Smart Air Connect purifiers.
 - [pvillanyi](https://github.com/pvillanyi) for contributing support for smartplugs with USB (Gosund SP112).
 - [pvillanyi](https://github.com/pvillanyi) for contributing support for smartplugs with USB (Gosund SP112).
+- [jaichinger](https://github.com/jaichinger) for contributing support for Breville Smart Air Viral Protect Plus purifier.

+ 1 - 0
DEVICES.md

@@ -112,6 +112,7 @@
 
 
 - Breville Easy Air purifier
 - Breville Easy Air purifier
 - Breville Smart Air Connect purifier
 - Breville Smart Air Connect purifier
+- Breville Smart Air Viral Protect Plus purifier
 - essentials portable air purifier
 - essentials portable air purifier
 - Himox H05 and H06 air purifiers
 - Himox H05 and H06 air purifiers
 - Hosome air purifier
 - Hosome air purifier

+ 1 - 5
custom_components/tuya_local/devices/breville_easyair_purifier.yaml

@@ -3,15 +3,11 @@ products:
   - id: k2mlahbu9v4xxdlb
   - id: k2mlahbu9v4xxdlb
 primary_entity:
 primary_entity:
   entity: fan
   entity: fan
+  icon: "mdi:air-purifier"
   dps:
   dps:
     - id: 1
     - id: 1
       name: switch
       name: switch
       type: boolean
       type: boolean
-      mapping:
-        - dps_val: true
-          icon: "mdi:air-purifier"
-        - dps_val: false
-          icon: "mdi:air-purifier-off"
     - id: 4
     - id: 4
       type: string
       type: string
       name: speed
       name: speed

+ 14 - 30
custom_components/tuya_local/devices/breville_smart_air_viral_protect_plus.yaml

@@ -7,11 +7,17 @@ primary_entity:
     - id: 1
     - id: 1
       name: switch
       name: switch
       type: boolean
       type: boolean
+      icon: "mdi:air-purifier"
+    - id: 3
+      type: string
+      name: preset_mode
       mapping:
       mapping:
-        - dps_val: true
-          icon: "mdi:air-purifier"
-        - dps_val: false
-          icon: "mdi:air-purifier-off"
+        - dps_val: "auto"
+          value: "Auto"
+        - dps_val: "manual"
+          value: "Manual"
+        - dps_val: "sleep"
+          value: "Sleep"
     - id: 4
     - id: 4
       type: string
       type: string
       name: speed
       name: speed
@@ -37,23 +43,6 @@ secondary_entities:
         class: measurement
         class: measurement
         mapping:
         mapping:
           - scale: 10
           - scale: 10
-  - entity: select
-    name: Mode
-    category: config
-    dps:
-      - id: 3
-        type: string
-        name: option
-        mapping:
-          - dps_val: "auto"
-            value: "Auto"
-            icon: "mdi:fan-auto"
-          - dps_val: "manual"
-            value: "Manual"
-            icon: "mdi:fan"
-          - dps_val: "sleep"
-            value: "Sleep"
-            icon: "mdi:power-sleep"
   - entity: switch
   - entity: switch
     name: Microbe shield
     name: Microbe shield
     category: config
     category: config
@@ -63,7 +52,7 @@ secondary_entities:
         name: switch
         name: switch
         type: boolean
         type: boolean
   - entity: sensor
   - entity: sensor
-    name: Filter Days Left
+    name: Filter days Left
     category: diagnostic
     category: diagnostic
     icon: "mdi:air-filter"
     icon: "mdi:air-filter"
     class: duration
     class: duration
@@ -75,6 +64,7 @@ secondary_entities:
   - entity: select
   - entity: select
     name: Timer
     name: Timer
     category: config
     category: config
+    icon: "mdi:fan-clock"
     dps:
     dps:
       - id: 18
       - id: 18
         type: string
         type: string
@@ -82,18 +72,14 @@ secondary_entities:
         mapping:
         mapping:
           - dps_val: "cancel"
           - dps_val: "cancel"
             value: "Cancel"
             value: "Cancel"
-            icon: "mdi:timer"
           - dps_val: "2h"
           - dps_val: "2h"
             value: "2 hours"
             value: "2 hours"
-            icon: "mdi:fan-clock"
           - dps_val: "4h"
           - dps_val: "4h"
             value: "4 hours"
             value: "4 hours"
-            icon: "mdi:fan-clock"
           - dps_val: "8h"
           - dps_val: "8h"
             value: "8 hours"
             value: "8 hours"
-            icon: "mdi:fan-clock"
   - entity: sensor
   - entity: sensor
-    name: Timer Minutes Left
+    name: Timer remaining
     category: diagnostic
     category: diagnostic
     icon: "mdi:timer-sand"
     icon: "mdi:timer-sand"
     class: duration
     class: duration
@@ -102,12 +88,10 @@ secondary_entities:
         name: sensor
         name: sensor
         type: integer
         type: integer
         unit: min
         unit: min
-        readonly: true
   - entity: sensor
   - entity: sensor
-    name: Air Quality
+    name: Air quality
     icon: "mdi:air-filter"
     icon: "mdi:air-filter"
     dps:
     dps:
       - id: 21
       - id: 21
         type: string
         type: string
         name: sensor
         name: sensor
-        readonly: true

+ 1 - 5
custom_components/tuya_local/devices/breville_smartairconnect_purifier.yaml

@@ -7,11 +7,7 @@ primary_entity:
     - id: 1
     - id: 1
       name: switch
       name: switch
       type: boolean
       type: boolean
-      mapping:
-        - dps_val: true
-          icon: "mdi:air-purifier"
-        - dps_val: false
-          icon: "mdi:air-purifier-off"
+      icon: "mdi:air-purifier"
     - id: 3
     - id: 3
       name: preset_mode
       name: preset_mode
       type: string
       type: string