Skip to content

Commit

Permalink
Tank full/empty sensors: use translations for name, state and icon
Browse files Browse the repository at this point in the history
Issue #1579
  • Loading branch information
make-all committed Mar 2, 2024
1 parent bc8c71e commit a2493c6
Show file tree
Hide file tree
Showing 53 changed files with 256 additions and 101 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ secondary_entities:
type: boolean
name: switch
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,7 @@ secondary_entities:
type: boolean
name: lock
- entity: binary_sensor
class: problem
name: Tank full
icon: "mdi:cup-water"
translation_key: tank_full
dps:
- id: 19
type: bitfield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@ secondary_entities:
name: sensor
unit: min
- entity: binary_sensor
name: Tank
class: problem
icon: "mdi:cup-water"
translation_key: tank_full
category: diagnostic
dps:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ secondary_entities:
unit: "%"
class: measurement
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@ secondary_entities:
unit: "%"
class: measurement
- entity: binary_sensor
class: problem
name: Tank full
icon: "mdi:cup-water"
translation_key: tank_full
dps:
- id: 19
type: bitfield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ secondary_entities:
- dps_val: f
value: fahrenheit
- entity: binary_sensor
name: Low water
class: problem
translation_key: tank_empty
category: diagnostic
dps:
- id: 22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,7 @@ secondary_entities:
type: boolean
name: lock
- entity: binary_sensor
class: problem
name: Tank full
icon: "mdi:cup-outline"
icon_priority: 2
translation_key: tank_full
dps:
- id: 11
type: bitfield
Expand All @@ -164,8 +161,6 @@ secondary_entities:
mapping:
- dps_val: 8
value: true
icon: "mdi:cup-water"
icon_priority: 1
- value: false
- entity: binary_sensor
translation_key: defrost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ secondary_entities:
- dps_val: 9h
value: 9 hours
- entity: binary_sensor
name: Tank empty
translation_key: tank_empty
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ secondary_entities:
type: integer
unit: min
- entity: binary_sensor
name: Water tank empty
icon: mdi:water-remove
class: problem
translation_key: tank_empty
category: diagnostic
dps:
- id: 22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ secondary_entities:
name: sensor
unit: "min"
- entity: binary_sensor
name: Water tank empty
class: problem
translation_key: tank_empty
category: diagnostic
dps:
- id: 22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ secondary_entities:
type: boolean
name: lock
- entity: binary_sensor
class: problem
name: Tank full
translation_key: tank_full
category: diagnostic
icon: "mdi:cup-water"
dps:
- id: 19
type: bitfield
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/eanons_humidifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ secondary_entities:
type: integer
unit: min
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_empty
category: diagnostic
dps:
- id: 9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ secondary_entities:
name: sensor
unit: min
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 102
Expand All @@ -129,10 +128,8 @@ secondary_entities:
mapping:
- dps_val: Bucket_OK
value: false
icon: "mdi:pail-outline"
- dps_val: Bucket_Full
value: true
icon: "mdi:pail-remove"
- entity: switch
name: Night mode
category: config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ primary_entity:
icon_priority: 1
secondary_entities:
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ secondary_entities:
unit: "%"
class: measurement
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ secondary_entities:
unit: "%"
class: measurement
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ secondary_entities:
unit: "%"
class: measurement
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,7 @@ secondary_entities:
- dps_val: false
icon: "mdi:sleep-off"
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand All @@ -143,7 +142,5 @@ secondary_entities:
mapping:
- dps_val: 1
value: true
icon: "mdi:flask-empty"
- dps_val: 0
value: false
icon: "mdi:flask-empty-outline"
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ secondary_entities:
- dps_val: false
icon: "mdi:sleep-off"
- entity: binary_sensor
name: Tank
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand All @@ -83,7 +83,5 @@ secondary_entities:
mapping:
- dps_val: 1
value: true
icon: "mdi:flask-empty"
- dps_val: 0
value: false
icon: "mdi:flask-empty-outline"
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ secondary_entities:
class: measurement
unit: "%"
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,7 @@ secondary_entities:
unit: "%"
class: measurement
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ secondary_entities:
type: boolean
name: lock
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,7 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
class: problem
name: Tank full or missing
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ secondary_entities:
value: false
- value: true
- entity: binary_sensor
name: Tank Full
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 101
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ secondary_entities:
class: measurement
unit: "%"
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ secondary_entities:
type: boolean
name: lock
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 19
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/kogan_dehumidifier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ secondary_entities:
class: measurement
unit: "%"
- entity: binary_sensor
class: problem
name: Tank
translation_key: tank_full
category: diagnostic
dps:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ primary_entity:
value: 100
secondary_entities:
- entity: binary_sensor
name: Tank empty
class: problem
translation_key: tank_empty
category: diagnostic
dps:
- id: 22
Expand Down
7 changes: 1 addition & 6 deletions custom_components/tuya_local/devices/probreeze_pb20.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ secondary_entities:
name: sensor
unit: min
- entity: binary_sensor
name: Tank
class: problem
icon: "mdi:cup-outline"
icon_priority: 2
translation_key: tank_full
category: diagnostic
dps:
- id: 11
Expand All @@ -145,6 +142,4 @@ secondary_entities:
mapping:
- dps_val: 8
value: true
icon: "mdi:cup-water"
icon_priority: 1
- value: false
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,7 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
name: Tank
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ secondary_entities:
unit: "%"
class: measurement
- entity: binary_sensor
name: Low water
class: problem
translation_key: tank_empty
category: diagnostic
dps:
- id: 22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,7 @@ secondary_entities:
value: false
- value: true
- entity: binary_sensor
name: Tank full
class: problem
translation_key: tank_full
category: diagnostic
dps:
- id: 22
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,8 @@ secondary_entities:
- dps_val: 24h
value: 24 hours
- entity: binary_sensor
class: problem
name: Tank full
translation_key: tank_full
category: diagnostic
icon: "mdi:cup-water"
dps:
- id: 19
type: bitfield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,8 @@ secondary_entities:
name: switch
type: boolean
- entity: binary_sensor
class: problem
name: Tank
translation_key: tank_empty
category: diagnostic
icon: "mdi:cup-outline"
dps:
- id: 22
type: bitfield
Expand Down
Loading

0 comments on commit a2493c6

Please sign in to comment.