Zemismart SPM02-3Z3 Zigbee 3.0 - wrong/chaotic entity naming
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.7k
- Forks
- 2k
- Avg merge
- 18h 55m
- Merged PRs (30d)
- 35
Description
What happened?
In this device which is 3phase power meter/sensor Z2M have some entities odd names, some reporting values have name _phase_A/_phase_B/phase_C but some have only B/C which is bit confusing and chaotic when I try to have no mess in HA statistics. In provided log I wrote also "suggested" names, here is also list of them:
- "current": 0, -> (current_phase_a)
- "power": 0, -> (power_phase_a)
- "power_apparent": 0, -> (power_apparent_phase_a)
- "power_factor": 0.99, -> (power_factor_phase_a)
- "power_reactive": 0, -> (power_reactive_phase_a)
- "voltage": 226.62, -> (voltage_phase_a)
and second thing, entities: voltage, voltage_phase_b, voltage_c, ac_frequency and power_factor are placed in HA under "Diagnostics" and not under "Sensors", mainly "power_factor" is in Diagnostic and "power_factor_phase_b" and "power_factor_phase_c" are in Sensors... I think all should be placed in Sensors section.
Edit: some other values are not reported to HA:
- "energy_tier_1": 0,
- "energy_tier_2": 0,
- "energy_tier_3": 0,
- "produced_energy_tier_1": 0,
- "produced_energy_tier_2": 0,
What did you expect to happen?
fix or provide way to fix this on local level (external converter?)
How to reproduce it (minimal and precise)
No response
Zigbee2MQTT version
2.14.0
Adapter firmware version
20250321
Adapter
Zstack
Setup
docker
Device database.db entry
No response
Debug log
{
"ac_frequency": 50.02,
"current": 0, -> (current_phase_a)
"current_phase_b": 0,
"current_phase_c": 0,
"device": {
"applicationVersion": 15,
"friendlyName": "PowerMeter - Z2M Main",
"hardwareVersion": 1,
"ieeeAddr": "0x901f09fffe7aac8d",
"manufacturerID": 4630,
"manufacturerName": "Zemismart",
"model": "SPM02-3Z3",
"networkAddress": 60850,
"powerSource": "Mains (single phase)",
"softwareBuildID": "001.02.00",
"stackVersion": 2,
"type": "Router",
"zclVersion": 3
},
"energy": 0,
"energy_phase_a": 0,
"energy_phase_b": 0,
"energy_phase_c": 0,
"energy_tier_1": 0,
"energy_tier_2": 0,
"energy_tier_3": 0,
"last_seen": 1788884165223,
"linkquality": 127,
"power": 0, -> (power_phase_a)
"power_apparent": 0, -> (power_apparent_phase_a)
"power_apparent_phase_b": 0,
"power_apparent_phase_c": 0,
"power_factor": 0.99, -> (power_factor_phase_a)
"power_factor_phase_b": 0.99,
"power_factor_phase_c": 0.99,
"power_phase_b": 0,
"power_phase_c": 0,
"power_reactive": 0, -> (power_reactive_phase_a)
"power_reactive_phase_b": 0,
"power_reactive_phase_c": 0,
"produced_energy": 0,
"produced_energy_phase_a": 0,
"produced_energy_phase_b": 0,
"produced_energy_phase_c": 0,
"produced_energy_tier_1": 0,
"produced_energy_tier_2": 0,
"state": "OFF",
"total_power": 0,
"total_power_apparent": 0,
"total_power_reactive": 0,
"voltage": 226.62, -> (voltage_phase_a)
"voltage_phase_b": 0.5,
"voltage_phase_c": 0.57
}
Notes
In Z2M GUI there are some entities which missing refresh icon:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Zemismart SPM02-3Z3 device definition in the Zigbee2MQTT source and compare its exposed entity names, categories, and reported energy fields with the issue's log. Check the relevant device-converter tests, if present, before changing the definition. Done means phase A names are consistent, measurements appear under Sensors, and the listed tier values are exposed without breaking the other phases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100