Skip to content

Commit

Permalink
Defrost sensors and anti-frost switches: use translations
Browse files Browse the repository at this point in the history
- binary_sensors indicating defrost cycle:
    use translations for name and icon, and on/off states
    remove any explicit icons, and class (variously cold, running, problem)

- switches to control anti-frost feature:
    use translations for name and icon

- simple one word translations filled in for all supported languages
  from Google translate (improvements from native speakers welcome)
  • Loading branch information
make-all committed Mar 2, 2024
1 parent 0dac409 commit 304a32a
Show file tree
Hide file tree
Showing 44 changed files with 445 additions and 272 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@ primary_entity:
name: week_program
secondary_entities:
- entity: switch
name: Anti-frost
icon: "mdi:snowflake"
translation_key: anti_frost
category: config
dps:
- id: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,8 @@ secondary_entities:
- dps_val: "3"
value: Both
- entity: switch
name: Anti-frost
translation_key: anti_frost
category: config
icon: "mdi:snowflake-melt"
dps:
- id: 26
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ secondary_entities:
min: 5
max: 60
- entity: switch
name: Anti-frost
translation_key: anti_frost
category: config
icon: "mdi:snowflake-melt"
dps:
- id: 103
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ secondary_entities:
min: -9
max: 9
- entity: switch
name: Anti-frost
icon: "mdi:snowflake-melt"
translation_key: anti_frost
category: config
dps:
- id: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,8 @@ secondary_entities:
- dps_val: "3"
value: Both
- entity: switch
name: Anti-frost
translation_key: anti_frost
category: config
icon: "mdi:snowflake-melt"
dps:
- id: 26
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,7 @@ primary_entity:
name: light_mode
secondary_entities:
- entity: switch
name: Anti-frost
icon: "mdi:snowflake"
translation_key: anti_frost
category: config
dps:
- id: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ primary_entity:
name: unknown_102
secondary_entities:
- entity: switch
name: Anti-frost
icon: "mdi:snowflake-melt"
translation_key: anti_frost
category: config
dps:
- id: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ secondary_entities:
type: boolean
name: lock
- entity: switch
name: Anti-frost
translation_key: anti_frost
category: config
icon: "mdi:snowflake"
dps:
- id: 10
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,7 @@ secondary_entities:
icon_priority: 1
- value: false
- entity: binary_sensor
name: Defrost
class: cold
icon: "mdi:snowflake-melt"
translation_key: defrost
category: diagnostic
dps:
- id: 105
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/carson_cb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ secondary_entities:
name: switch
optional: true
- entity: binary_sensor
name: Defrosting
class: cold
translation_key: defrost
category: diagnostic
dps:
- id: 102
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,16 @@ secondary_entities:
- dps_val: "off"
value: false
- entity: binary_sensor
name: Defrosting
translation_key: defrost
category: diagnostic
class: cold
dps:
- id: 181
name: sensor
type: boolean
optional: true
- entity: switch
name: Anti-frost
translation_key: anti_frost
category: config
icon: "mdi:snowflake"
dps:
- id: 180
name: switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ secondary_entities:
name: switch
type: boolean
- entity: switch
name: Anti-frost
translation_key: anti_frost
category: config
dps:
- id: 104
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
name: Defrost
class: problem
translation_key: defrost
category: diagnostic
dps:
- id: 19
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/etop_ht_thermostat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,7 @@ primary_entity:
name: fault_code
secondary_entities:
- entity: switch
name: "Anti-frost"
icon: "mdi:snowflake-melt"
translation_key: anti_frost
category: config
dps:
- id: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
name: Anti-frost
class: cold
translation_key: defrost
category: diagnostic
dps:
- id: 103
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,7 @@ secondary_entities:
value: false
- value: true
- entity: binary_sensor
name: Defrost
class: cold
icon: "mdi:snowflake-melt"
translation_key: defrost
category: diagnostic
dps:
- id: 105
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ secondary_entities:
type: boolean
name: switch
- entity: switch
name: Anti frost
icon: "mdi:snowflake"
translation_key: anti_frost
category: config
dps:
- id: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,7 @@ secondary_entities:
type: boolean
name: sensor
- entity: binary_sensor
name: Defrosting
class: running
translation_key: defrost
category: diagnostic
dps:
- id: 33
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,7 @@ secondary_entities:
name: sensor
unit: min
- entity: binary_sensor
class: cold
name: Defrost
translation_key: defrost
category: diagnostic
dps:
- id: 19
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/its_45hd_heatpump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ primary_entity:
name: dipswitch_2
secondary_entities:
- entity: switch
name: Defrost
icon: "mdi:snowflake"
translation_key: anti_frost
category: config
dps:
- id: 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ secondary_entities:
value: false
- value: true
- entity: binary_sensor
name: Defrost
class: cold
icon: "mdi:snowflake-melt"
translation_key: defrost
category: diagnostic
dps:
- id: 105
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,14 @@ primary_entity:
mapping:
- dps_val: false
value: "off"
icon: "mdi:hvac-off"
- dps_val: true
constraint: mode
conditions:
- dps_val: COOL
icon: "mdi:snowflake"
value: cool
- dps_val: FAN
icon: "mdi:fan"
value: fan_only
- dps_val: DRY
icon: "mdi:water"
value: dry
- id: 2
name: temperature
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/madimack_heatpump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
name: Defrosting
class: cold
translation_key: defrost
category: diagnostic
dps:
- id: 130
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/me80_thermostat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,8 @@ secondary_entities:
- dps_val: f
value: F
- entity: switch
name: Anti-frost
translation_key: anti_frost
category: config
icon: "mdi:snowflake"
dps:
- id: 103
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,7 @@ secondary_entities:
name: lock
- entity: switch
category: config
name: Anti-frost
icon: "mdi:snowflake-melt"
translation_key: anti_frost
dps:
- id: 9
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
name: Anti-freeze
class: cold
translation_key: defrost
category: diagnostic
dps:
- id: 15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ primary_entity:
value: E3
secondary_entities:
- entity: switch
name: Anti-frost
translation_key: anti_frost
category: config
icon: "mdi:snowflake"
dps:
- id: 10
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
name: Defrost
class: cold
icon: "mdi:snowflake-melt"
translation_key: defrost
category: diagnostic
dps:
- id: 11
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/t5e_wf_thermostat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,8 @@ secondary_entities:
type: boolean
name: switch
- entity: switch
name: Frost protection
translation_key: anti_frost
category: config
icon: "mdi:snowflake"
dps:
- id: 10
type: boolean
Expand Down
13 changes: 13 additions & 0 deletions custom_components/tuya_local/icons.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"entity": {
"binary_sensor": {
"defrost": {
"default": "mdi:circle-outline",
"state": {
"on": "mdi:snowflake-melt"
}
}
},
"lock": {
"child_lock": {
"default": "mdi:hand-back-right",
Expand All @@ -23,6 +31,11 @@
"fahrenheit": "mdi:temperature-fahrenheit"
}
}
},
"switch": {
"anti_frost": {
"default": "mdi:snowflake-melt"
}
}
}
}
14 changes: 14 additions & 0 deletions custom_components/tuya_local/translations/bg.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@
}
},
"entity": {
"binary_sensor": {
"defrost": {
"name": "Размразяване",
"state": {
"off": "Нормално",
"on": "Размразяване"
}
}
},
"climate": {
"aircon_extra": {
"state_attributes": {
Expand Down Expand Up @@ -216,6 +225,11 @@
"fahrenheit": "Фаренхайт"
}
}
},
"switch": {
"anti_frost": {
"name": "Анти-замръзване"
}
}
}
}
Loading

0 comments on commit 304a32a

Please sign in to comment.