Skip to content

Commit

Permalink
Generic error/fault sensors: standardize handling.
Browse files Browse the repository at this point in the history
- use a `class: problem` binary_sensor
- do not set a name, to take advantage of HA provided translations
- do not set any icons

This is a breaking change, as most of these were named either "Fault"
or "Error" previously, so their entity id will change.

Issue #1597
  • Loading branch information
make-all committed Mar 2, 2024
1 parent b2c87dc commit 5e3f2a5
Show file tree
Hide file tree
Showing 172 changed files with 84 additions and 240 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ secondary_entities:
- dps_val: fine
value: false
- entity: binary_sensor
name: Fault
class: problem
dps:
- id: 105
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ secondary_entities:
- value: false
- entity: binary_sensor
class: problem
name: Fault
dps:
- id: 19
type: bitfield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ secondary_entities:
- value: false
- entity: binary_sensor
class: problem
name: Fault
dps:
- id: 19
type: bitfield
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ primary_entity:
secondary_entities:
- entity: binary_sensor
class: problem
name: Fault
category: diagnostic
dps:
- id: 15
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ secondary_entities:
name: sensor
unit: min
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ secondary_entities:
min: 0
max: 24
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
1 change: 0 additions & 1 deletion custom_components/tuya_local/devices/arlec_6speed_fan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ primary_entity:
name: fault_code
secondary_entities:
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ secondary_entities:
value: "No button"
hidden: true
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ secondary_entities:
type: boolean
name: switch
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ secondary_entities:
name: limits
# format: min,max
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ secondary_entities:
mapping:
- scale: 0.04
- entity: binary_sensor
name: Error
category: diagnostic
class: problem
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ secondary_entities:
value: Internal
hidden: true
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ secondary_entities:
type: boolean
name: switch
- entity: binary_sensor
name: Fault alarm
category: diagnostic
class: problem
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ secondary_entities:
min: 1
max: 9
- entity: binary_sensor
name: Error
category: diagnostic
class: problem
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ secondary_entities:
type: boolean
name: lock
- entity: binary_sensor
name: Fault
category: diagnostic
class: problem
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ secondary_entities:
icon: "mdi:thermometer"
value: Both
- entity: binary_sensor
name: Error
category: diagnostic
class: problem
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ secondary_entities:
type: boolean
name: switch
- entity: binary_sensor
name: Fault alarm
category: diagnostic
class: problem
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ secondary_entities:
type: boolean
name: lock
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ primary_entity:
name: min_temperature
mapping:
- scale: 10
- id: 45
type: integer
name: Error Code
- id: 101
type: integer
name: unknown_101
Expand Down Expand Up @@ -120,7 +117,6 @@ secondary_entities:
type: boolean
name: lock
- entity: binary_sensor
name: Error
category: diagnostic
class: problem
dps:
Expand All @@ -131,6 +127,9 @@ secondary_entities:
- dps_val: 0
value: false
- value: true
- id: 45
type: bitfield
name: fault_code
- entity: number
name: High temperature limit
category: config
Expand Down
13 changes: 3 additions & 10 deletions custom_components/tuya_local/devices/ble_water_valve.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,7 @@ secondary_entities:
type: integer
name: sensor
unit: "%"
- entity: sensor
name: Fault code
category: diagnostic
icon: "mdi:alert"
dps:
- id: 4
type: integer
name: sensor
optional: true
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand All @@ -61,6 +51,9 @@ secondary_entities:
- dps_val: null
value: false
- value: true
- id: 4
type: bitfield
name: fault_code
- entity: sensor
name: Operation
category: diagnostic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ secondary_entities:
- dps_val: "24"
value: "24 hours"
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ secondary_entities:
name: sensor
unit: min
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ secondary_entities:
name: sensor
- entity: binary_sensor
class: problem
name: Fault
category: diagnostic
dps:
- id: 11
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ secondary_entities:
value: 9 hours
- entity: binary_sensor
translation_key: tank_empty
class: problem
category: diagnostic
dps:
- id: 22
Expand Down
1 change: 0 additions & 1 deletion custom_components/tuya_local/devices/carson_cb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ secondary_entities:
unit: min
class: measurement
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ primary_entity:
name: fault_code
secondary_entities:
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ primary_entity:
value: comfort
secondary_entities:
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
1 change: 0 additions & 1 deletion custom_components/tuya_local/devices/daizuki_heatpump.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ secondary_entities:
mapping:
- mask: "0010"
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,6 @@ secondary_entities:
name: switch
type: boolean
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ secondary_entities:
- dps_val: "3"
value: "Nightlight"
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
1 change: 0 additions & 1 deletion custom_components/tuya_local/devices/djive_arc_fan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ secondary_entities:
- dps_val: auto
value: auto
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ secondary_entities:
- value: false
- entity: binary_sensor
class: problem
name: Fault
category: diagnostic
dps:
- id: 19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ secondary_entities:
mapping:
- scale: 10000
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ secondary_entities:
name: calibration
optional: true
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ secondary_entities:
type: boolean
name: switch
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ secondary_entities:
mapping:
- scale: 1000
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ secondary_entities:
value: true
- value: false
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ secondary_entities:
name: sensor
unit: min
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ secondary_entities:
- dps_val: true
value: fahrenheit
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
1 change: 0 additions & 1 deletion custom_components/tuya_local/devices/ems_waterheater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ secondary_entities:
unit: C
class: measurement
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ primary_entity:
optional: true
secondary_entities:
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ secondary_entities:
name: sensor
unit: min
- entity: binary_sensor
name: Fault
class: problem
category: diagnostic
dps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ secondary_entities:
- scale: 10
step: 5
- entity: binary_sensor
name: Error
category: diagnostic
class: problem
dps:
Expand Down
1 change: 0 additions & 1 deletion custom_components/tuya_local/devices/eurom_600_heater.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ primary_entity:
name: error
secondary_entities:
- entity: binary_sensor
name: Error
category: diagnostic
class: problem
dps:
Expand Down
Loading

0 comments on commit 5e3f2a5

Please sign in to comment.