Skip to content

Commit

Permalink
Fan: add translations for aroma diffusers.
Browse files Browse the repository at this point in the history
- specific name
- icons
- presets: low, medium, high, continuous, intermittent

Issue #1708
  • Loading branch information
make-all committed Aug 25, 2024
1 parent 3e1a5d6 commit 95a8471
Show file tree
Hide file tree
Showing 29 changed files with 326 additions and 46 deletions.
5 changes: 3 additions & 2 deletions custom_components/tuya_local/devices/asakuki_diffuser.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Asakuki aroma diffuser
name: Aroma diffuser
products:
- id: 6ASdNwe9IdaewQEl
name: Asakuki cube light
primary_entity:
entity: fan
icon: "mdi:scent"
translation_key: aroma_diffuser
dps:
- id: 11
type: boolean
Expand Down
13 changes: 4 additions & 9 deletions custom_components/tuya_local/devices/cadence_aroma_diffuser.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
name: Aroma diffuser
products:
- id: 1sim2gu7dd5rh3j3
name: Cadence ultrasonic aroma diffuser
name: Cadence Ultrasonic
primary_entity:
entity: fan
translation_only_key: fan_with_presets
translation_key: aroma_diffuser
dps:
- id: 2
name: switch
type: boolean
mapping:
- dps_val: true
icon: "mdi:scent"
- dps_val: false
icon: "mdi:scent-off"
- id: 103
name: preset_mode
type: string
mapping:
- dps_val: continued
value: normal
value: continuous
- dps_val: indirect
value: nature
value: intermittent
secondary_entities:
- entity: switch
name: Power
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ products:
name: Sierra Modern Home diffuser
primary_entity:
entity: fan
icon: "mdi:scent"
translation_key: aroma_diffuser
dps:
- id: 1
type: boolean
Expand All @@ -23,10 +23,6 @@ primary_entity:
- dps_val: null
value: 0
hidden: true
- id: 12
type: bitfield
name: fault_code
optional: true
secondary_entities:
- entity: light
category: config
Expand Down Expand Up @@ -109,6 +105,10 @@ secondary_entities:
- dps_val: null
value: false
- value: true
- id: 12
type: bitfield
name: fault_code
optional: true
- entity: select
translation_key: timer
category: config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ products:
- id: rvajlvjh4qoj1lkn
primary_entity:
entity: fan
translation_key: aroma_diffuser
dps:
- id: 2
name: switch
type: boolean
mapping:
- dps_val: true
icon: mdi:scent
- dps_val: false
icon: mdi:scent-off
- id: 3
name: speed
type: string
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Aroma diffuser
primary_entity:
entity: fan
icon: "mdi:scent"
translation_key: aroma_diffuser
dps:
- id: 1
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ primary_entity:
name: switch
secondary_entities:
- entity: fan
icon: "mdi:scent"
translation_key: aroma_diffuser
dps:
- id: 104
type: boolean
Expand All @@ -20,9 +20,9 @@ secondary_entities:
name: preset_mode
mapping:
- dps_val: "1"
value: Continuous
value: continuous
- dps_val: "2"
value: Intermittent
value: intermittent
- entity: light
dps:
- id: 11
Expand Down
13 changes: 4 additions & 9 deletions custom_components/tuya_local/devices/yx025wb_aromadiffuser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,23 @@ products:
name: Liplasting YX-025WB
primary_entity:
entity: fan
icon: "mdi:scent"
translation_key: aroma_diffuser
dps:
- id: 2
name: switch
optional: true
type: boolean
mapping:
- dps_val: false
icon: "mdi:scent-off"
- dps_val: true
icon: "mdi:scent"
- id: 3
type: string
optional: true
name: preset_mode
mapping:
- dps_val: small
value: small
value: low
- dps_val: large
value: large
value: high
- dps_val: interval
value: interval
value: intermittent
secondary_entities:
- entity: light
icon: "mdi:light-recessed"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,11 @@ products:
name: YX316WIFI
primary_entity:
entity: fan
icon: "mdi:scent"
translation_key: aroma_diffuser
dps:
- id: 2
name: switch
type: boolean
mapping:
- dps_val: true
icon: "mdi:scent"
- dps_val: false
icon: "mdi:scent-off"
- id: 3
type: string
name: preset_mode
Expand All @@ -27,7 +22,7 @@ primary_entity:
- dps_val: "4H"
value: "high"
- dps_val: "10SEC"
value: "10 seconds"
value: "intermittent"
- id: 11
name: fault_code
type: bitfield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@ products:
name: Tellur
primary_entity:
entity: fan
translation_key: aroma_diffuser
dps:
- id: 1
name: switch
type: boolean
mapping:
- dps_val: true
icon: "mdi:scent"
- dps_val: false
icon: "mdi:scent-off"
- id: 2
name: speed
type: string
Expand Down
17 changes: 17 additions & 0 deletions custom_components/tuya_local/icons.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,23 @@
}
},
"fan": {
"aroma_diffuser": {
"default": "mdi:scent",
"state": {
"off": "mdi:scent-off"
},
"state_attributes": {
"preset_mode": {
"state": {
"low": "mdi:signal-cellular-1",
"medium": "mdi:signal-cellular-2",
"high": "mdi:signal-cellular-3",
"continuous": "mdi:clock-start",
"intermittent": "mdi:timer-settings-outline"
}
}
}
},
"fan_with_presets": {
"state_attributes": {
"preset_mode": {
Expand Down
15 changes: 15 additions & 0 deletions custom_components/tuya_local/translations/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@
}
},
"fan": {
"aroma_diffuser": {
"name": "Ароматизатор",
"state_attributes": {
"preset_mode": {
"state": {
"low": "Ниско",
"medium": "Средно",
"high": "Високо",
"continuous": "Непрекъснато",
"intermittent": "Интервално"
}
}
}
},
"fan_with_presets": {
"state_attributes": {
"preset_mode": {
Expand All @@ -248,6 +262,7 @@
}
},
"ventilation": {
"name": "Вентилация",
"state_attributes": {
"preset_mode": {
"state": {
Expand Down
15 changes: 15 additions & 0 deletions custom_components/tuya_local/translations/cz.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@
}
},
"fan": {
"aroma_diffuser": {
"name": "Aroma difuzér",
"state_attributes": {
"preset_mode": {
"state": {
"low": "Nízký",
"medium": "Střední",
"high": "Vysoký",
"continuous": "Nepřetržitý",
"intermittent": "Přerušovaný"
}
}
}
},
"fan_with_presets": {
"state_attributes": {
"preset_mode": {
Expand All @@ -248,6 +262,7 @@
}
},
"ventilation": {
"name": "Ventilace",
"state_attributes": {
"preset_mode": {
"state": {
Expand Down
15 changes: 15 additions & 0 deletions custom_components/tuya_local/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@
}
},
"fan": {
"aroma_diffuser": {
"name": "Aroma Diffuser"
"state_attributes": {
"preset_mode": {
"state": {
"low": "Niedrig",
"medium": "Mittel",
"high": "Hoch",
"continuous": "Dauerbetrieb",
"intermittent": "Intervall"
}
}
}
},
"fan_with_presets": {
"state_attributes": {
"preset_mode": {
Expand All @@ -248,6 +262,7 @@
}
},
"ventilation": {
"name": "Lüftung",
"state_attributes": {
"preset_mode": {
"state": {
Expand Down
15 changes: 15 additions & 0 deletions custom_components/tuya_local/translations/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@
}
},
"fan": {
"aroma_diffuser": {
"name": "Αρωματικός διαχύτης"
"state_attributes": {
"preset_mode": {
"state": {
"low": "Χαμηλή",
"medium": "Μεσαία",
"high": "Υψηλή",
"continuous": "Συνεχής",
"intermittent": "Διακεκομμένη"
}
}
}
},
"fan_with_presets": {
"state_attributes": {
"preset_mode": {
Expand All @@ -248,6 +262,7 @@
}
},
"ventilation": {
"name": "Αερισμός",
"state_attributes": {
"preset_mode": {
"state": {
Expand Down
15 changes: 15 additions & 0 deletions custom_components/tuya_local/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,20 @@
}
},
"fan": {
"aroma_diffuser": {
"name": "Aroma diffuser",
"state_attributes": {
"preset_mode": {
"state": {
"low": "Low",
"medium": "Medium",
"high": "High",
"continuous": "Continuous",
"intermittent": "Intermittent"
}
}
}
},
"fan_with_presets": {
"state_attributes": {
"preset_mode": {
Expand All @@ -295,6 +309,7 @@
}
},
"ventilation": {
"name": "Ventilation",
"state_attributes": {
"preset_mode": {
"state": {
Expand Down
15 changes: 15 additions & 0 deletions custom_components/tuya_local/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,20 @@
}
},
"fan": {
"aroma_diffuser": {
"name": "Difusor de aroma"
"state_attributes": {
"preset_mode": {
"state": {
"low": "Bajo",
"medium": "Medio",
"high": "Alto",
"continuous": "Continuo",
"intermittent": "Intermitente"
}
}
}
},
"fan_with_presets": {
"state_attributes": {
"preset_mode": {
Expand All @@ -248,6 +262,7 @@
}
},
"ventilation": {
"name": "Ventilación",
"state_attributes": {
"preset_mode": {
"state": {
Expand Down
Loading

0 comments on commit 95a8471

Please sign in to comment.