Skip to content

Commit

Permalink
Convert common light types to use translations
Browse files Browse the repository at this point in the history
- Backlight
- Display
- Indicator
- Laser
- Nightlight
For fireplaces:
- Flame
- Embers
- Logs

Issue #1708
  • Loading branch information
make-all committed Apr 7, 2024
1 parent 1e9021b commit 6d575b9
Show file tree
Hide file tree
Showing 124 changed files with 592 additions and 315 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ secondary_entities:
- dps_val: f
value: fahrenheit
- entity: light
name: Flame
translation_key: flame
dps:
- id: 115
type: boolean
Expand Down Expand Up @@ -150,7 +150,7 @@ secondary_entities:
type: boolean
name: switch
- entity: light
name: Ember
translation_key: embers
category: config
dps:
- id: 116
Expand Down Expand Up @@ -194,7 +194,7 @@ secondary_entities:
name: orange_disabled
type: boolean
- entity: light
name: Logs
translation_key: logs
category: config
dps:
- id: 118
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ secondary_entities:
unit: C
class: measurement
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 9
Expand Down
12 changes: 4 additions & 8 deletions custom_components/tuya_local/devices/aspen_asp200_fan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,12 @@ secondary_entities:
type: integer
unit: F
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 102
type: integer
name: brightness
mapping:
- dps_val: 1
value: 51
- dps_val: 2
value: 128
- dps_val: 3
value: 255
range:
min: 1
max: 3
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ primary_entity:
value: horizontal
secondary_entities:
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ secondary_entities:
- dps_val: end
value: End
- entity: light
name: Backlight
translation_key: backlight
category: config
dps:
- id: 7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ primary_entity:
secondary_entities:
- entity: light
category: config
name: Backlight
translation_key: backlight
dps:
- id: 101
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ secondary_entities:
type: boolean
name: lock
- entity: light
name: Indicator
translation_key: indicator
category: config
icon: "mdi:led-on"
dps:
- id: 101
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,9 @@ secondary_entities:
name: lock
type: boolean
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 1
name: switch
type: boolean
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,10 @@ secondary_entities:
name: lock
type: boolean
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 1
name: switch
type: boolean
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"

Check failure on line 68 in custom_components/tuya_local/devices/beca_bhp6000_thermostat_f.yaml

View workflow job for this annotation

GitHub Actions / lint

68:1 [empty-lines] too many blank lines (1 > 0)
Original file line number Diff line number Diff line change
Expand Up @@ -389,14 +389,9 @@ secondary_entities:
name: lock
type: boolean
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 1
name: switch
type: boolean
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"
Original file line number Diff line number Diff line change
Expand Up @@ -158,24 +158,20 @@ secondary_entities:
name: button
type: boolean
- entity: light
name: Backlight
translation_key: backlight
category: config
dps:
- id: 106
type: string
name: brightness
mapping:
- dps_val: "0"
icon: "mdi:lightbulb-on-10"
value: 0
- dps_val: "1"
icon: "mdi:lightbulb-on-40"
value: 100
- dps_val: "2"
icon: "mdi:lightbulb-on-70"
value: 180
- dps_val: "3"
icon: "mdi:lightbulb-on"
value: 255
- entity: select
name: Schedule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,12 @@ secondary_entities:
type: boolean
optional: true
- entity: light
name: LED
translation_key: indicator
category: config
dps:
- id: 5
name: switch
type: boolean
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"
- entity: fan
name: Spray level
icon: "mdi:heat-wave"
Expand Down
2 changes: 1 addition & 1 deletion custom_components/tuya_local/devices/bvf_cp1_heater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ primary_entity:
name: current_temperature
secondary_entities:
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ primary_entity:
optional: true
secondary_entities:
- entity: light
name: Indicator
translation_key: indicator
category: config
icon: "mdi:led-on"
dps:
- id: 101
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ secondary_entities:
- dps_val: level_3
value: 100
- entity: light
name: Display
icon: "mdi:television-ambient-light"
translation_key: display
category: config
dps:
- id: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ primary_entity:
name: feed_report
optional: true
secondary_entities:
- entity: switch
name: Indicator
- entity: light
translation_key: indicator
category: config
icon: "mdi:led-on"
dps:
- id: 101
type: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,8 @@ secondary_entities:
name: switch
type: boolean
- entity: light
name: Display
translation_key: display
category: config
icon: "mdi:television-ambient-light"
dps:
- id: 13
name: switch
Expand Down
3 changes: 1 addition & 2 deletions custom_components/tuya_local/devices/daizuki_heatpump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@ secondary_entities:
- dps_val: "5"
value: Rightmost
- entity: light
name: Display
translation_key: display
category: config
icon: "mdi:television-ambient-light"
dps:
- id: 123
type: hex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ secondary_entities:
name: switch
type: boolean
- entity: light
name: Backlight
translation_key: backlight
category: config
icon: "mdi:television-ambient-light"
dps:
- id: 13
name: switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ primary_entity:
name: switch
secondary_entities:
- entity: light
name: Night light
translation_key: nightlight
dps:
- id: 27
name: switch
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ primary_entity:
optional: true
secondary_entities:
- entity: light
name: LED
category: config
dps:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ secondary_entities:
name: sensor
unit: min
- entity: light
name: Flame
icon: "mdi:fire"
translation_key: flame
category: config
dps:
- id: 101
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,9 @@ secondary_entities:
name: switch
type: boolean
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 104
name: switch
type: boolean
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"
Original file line number Diff line number Diff line change
Expand Up @@ -89,17 +89,12 @@ secondary_entities:
name: switch
type: boolean
- entity: light
name: Indicator light
translation_key: indicator
category: config
dps:
- id: 101
type: boolean
name: switch
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"
- entity: switch
translation_key: ionizer
category: config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,12 @@ primary_entity:
name: current_temperature
secondary_entities:
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 101
type: boolean
name: switch
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"
- entity: sensor
class: temperature
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,12 @@ primary_entity:
name: error_code
secondary_entities:
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 101
type: boolean
name: switch
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"
- entity: switch
name: Sleep
category: config
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,12 @@ secondary_entities:
name: switch
type: boolean
- entity: light
name: Display
translation_key: display
category: config
dps:
- id: 101
type: boolean
name: switch
mapping:
- dps_val: true
icon: "mdi:led-on"
- dps_val: false
icon: "mdi:led-off"
- entity: switch
translation_key: ionizer
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ secondary_entities:
type: boolean
name: switch
- entity: light
name: Nightlight
translation_key: nightlight
dps:
- id: 7
name: switch
Expand Down
Loading

0 comments on commit 6d575b9

Please sign in to comment.