Add sensors, number and select for Tuya EV charger (qccdz) - #181453
Add sensors, number and select for Tuya EV charger (qccdz)#181453o-borovets wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Hi @o-borovets
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
|
Hey there @tuya, @zlinoliver, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
There was a problem hiding this comment.
🟢 Approval recommended
The entity definitions align with Tuya metadata and are covered by representative fixtures and snapshots.
Pull request overview
Adds broader Tuya qccdz EV charger support across sensor, number, and select platforms.
Changes:
- Adds charger status, energy, power, temperature, current, and mode entities.
- Adds DP codes and entity translations.
- Adds a charger fixture and comprehensive discovery snapshots.
File summaries
| File | Description |
|---|---|
homeassistant/components/tuya/const.py |
Defines new charger DP codes. |
homeassistant/components/tuya/number.py |
Adds charging-current control. |
homeassistant/components/tuya/select.py |
Adds charging-mode selection. |
homeassistant/components/tuya/sensor.py |
Adds charger telemetry sensors. |
homeassistant/components/tuya/strings.json |
Adds entity and state translations. |
tests/components/tuya/fixtures/qccdz_dsmsam7xpb3ht7rl.json |
Adds EV charger diagnostics fixture. |
tests/components/tuya/snapshots/test_init.ambr |
Covers device registration. |
tests/components/tuya/snapshots/test_number.ambr |
Covers charging-current discovery. |
tests/components/tuya/snapshots/test_select.ambr |
Covers charging-mode discovery. |
tests/components/tuya/snapshots/test_sensor.ambr |
Covers charger sensor discovery. |
tests/components/tuya/snapshots/test_switch.ambr |
Covers switch discovery for the new fixture. |
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
The qccdz category only exposed the on/off switch. Add the remaining data points these chargers report: - sensors: work_state (status enum), forward_energy_total (kWh, total_increasing), charge_energy_once (session energy), sigle_phase_power and power_total (kW), temp_current (°C, diagnostic) - number: charge_cur_set (charging current, A) - select: work_mode (charge_now / charge_pct / charge_energy / charge_schedule) New DP codes: charge_cur_set, charge_energy_once, sigle_phase_power (Tuya's own spelling). Add the qccdz_dsmsam7xpb3ht7rl fixture from device diagnostics and update snapshots; the existing qccdz_7bvgooyjhiua1yyq fixture gains status, session energy and mode entities.
885bfbc to
188e07c
Compare
There was a problem hiding this comment.
Hi @o-borovets
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!
There was a problem hiding this comment.
🟢 Approval recommended
The mappings match the supplied device metadata and have comprehensive snapshot coverage, with only a non-blocking comment cleanup.
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 1
- Review effort level: Balanced
| CH2O_VALUE = "ch2o_value" | ||
| CH4_SENSOR_STATE = "ch4_sensor_state" | ||
| CH4_SENSOR_VALUE = "ch4_sensor_value" | ||
| CHARGE_CUR_SET = "charge_cur_set" # Charging current setpoint |
Proposed change
The Tuya
qccdz(EV charger) category currently exposes only the on/off switch.This adds the remaining data points these chargers report:
work_state(status enum),forward_energy_total(total energy, kWh,total_increasing),
charge_energy_once(session energy),sigle_phase_powerand
power_total(kW),temp_current(°C, diagnostic)charge_cur_set(charging current, A)work_mode(charge_now / charge_pct / charge_energy / charge_schedule)New DP codes:
charge_cur_set,charge_energy_once,sigle_phase_power(Tuya's own spelling). Fixture
qccdz_dsmsam7xpb3ht7rladded from devicediagnostics; snapshots updated — the existing
qccdz_7bvgooyjhiua1yyqfixturegains status, session energy and mode entities.
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: