Skip to content

Commit

Permalink
TOMPD-63LW: revert additions from TOMPD-63WIFI, add TOMPD-63LW v2
Browse files Browse the repository at this point in the history
Two "new" configs were submitted at the same time:
TOMPD-63-WIFI, and another variant of TOMPD-63LW

Initial analysis showed that the TOMPD-63-WIFI was closer to the original
TOMPD-63LW config, but actually both are just extending it with a few new
entities that can be made optional, and the -WIFI one actually removed
some entities that the 63LW didn't.

Both added numeric dps 104 and 105, but the WIFI has them as config options
for Over/Under voltage handling timeouts, while the 63LW has them as sensors
(power factor and frequency).

Since the 63LW is the same name, it should probably get priority.

PR #2619, reverting previous config merge of PR #2618
  • Loading branch information
make-all committed Dec 8, 2024
1 parent 64fee8b commit 41b83f7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 21 deletions.
53 changes: 34 additions & 19 deletions custom_components/tuya_local/devices/tompd_63lw_breaker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ products:
name: TOMPD-63LW
- id: psjg8ldomxnelfp5
name: TOMZN-63A
- id: wcihaluccfsoayqa
name: TOMPD-63WIFI
- id: u0cxoxtfelys3ufx
name: TOMPD-63LW
primary_entity:
entity: switch
icon: "mdi:fuse"
Expand Down Expand Up @@ -167,29 +167,44 @@ secondary_entities:
type: bitfield
name: fault_code
optional: true
- entity: number
name: Voltage protection time
- entity: button
translation_key: factory_reset
category: config
dps:
- id: 34
type: boolean
name: button
optional: true
- entity: button
name: Clear energy
class: restart
category: config
icon: "mdi:timer"
dps:
- id: 101
type: boolean
name: button
optional: true
- entity: sensor
class: power_factor
category: diagnostic
dps:
- id: 104
type: integer
optional: true
name: value
unit: s
range:
min: 1
max: 30
- entity: number
name: Voltage recovery time
category: config
icon: "mdi:timer"
name: sensor
unit: "%"
class: measurement
mapping:
- scale: 10
- entity: sensor
class: frequency
category: diagnostic
dps:
- id: 105
type: integer
optional: true
name: value
unit: s
range:
min: 1
max: 500
name: sensor
unit: Hz
class: measurement
mapping:
- scale: 10
4 changes: 2 additions & 2 deletions tests/devices/test_tompd63lw_breaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ def setUp(self):
"button_energy_reset",
"button_refresh_sensors",
"number_charge_energy",
"number_voltage_protection_time",
"number_voltage_recovery_time",
"sensor_balance_energy",
"sensor_current",
"sensor_frequency",
"sensor_leakage_current",
"sensor_power",
"sensor_power_factor",
"sensor_voltage",
"switch_prepayment",
]
Expand Down

0 comments on commit 41b83f7

Please sign in to comment.