Repenic Dimmer: start_brightness exposed with max 254, but device reports 255 (restore previous level)

Open Beginner friendly
#33,596 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
embedded-iot

Research direction

The start_brightness number is exposed with value_max: 254, but the Level Control cluster's StartUpCurrentLevel uses 0xFF to mean restore previous. Find where the device converter defines this option, and check how other converters expose start-up level as a preset. Run the Repenic RD-250ZG converter against the state payload with startUpOnOff 255 to confirm that the 255 value is rejected. Done means the value is exposed as a valid option (max 255 or a previous preset) and the converter tests pass.

Written by the indexing model from the issue text.

Description

problem
What happened?

Two Repenic Ltd. "Dimmer" devices (firmware 1.1.0) report start_brightness: 255 in every state payload. In the ZCL Level Control cluster, StartUpCurrentLevel = 0xFF is a valid value that means "restore the previous level", so the device itself is behaving correctly.

Zigbee2MQTT exposes start_brightness as a numeric with value_max: 254. Home Assistant's MQTT number platform therefore rejects the value on every state publish, and the entity stays unknown:

homeassistant.components.mqtt.number: Invalid value for number.living_room_downlights_start_brightness: 255 (range 0.0 - 254.0)
homeassistant.components.mqtt.number: Invalid value for number.living_room_pendant_start_brightness: 255 (range 0.0 - 254.0)

Because the dimmers report power and energy often, this produced about 1,700 errors in under a day.

What did you expect to happen?

I expected the exposed range of start_brightness to accept the device's real values. Either the max should be 255, or (preferably) 255 should be exposed as a preset such as previous, as other converters already do for start-up level.

How to reproduce it (minimal and precise)
  1. Pair a Repenic Dimmer (firmware 1.1.0) with its start-up level left at the default (0xFF, restore previous).
  2. Enable Home Assistant MQTT discovery.
  3. Let the device publish state (for example a power or energy report, or toggle the light).
  4. The Home Assistant log shows Invalid value ... 255 (range 0.0 - 254.0) for the start_brightness number entity on every publish.
Zigbee2MQTT version

2.14.3

Adapter firmware version

0x26580700

Adapter

ConBee II (deCONZ)

Setup

Docker container on Unraid (x86-64).
Linux Raptor 6.12.54-Unraid #1 SMP PREEMPT_DYNAMIC Tue Oct 21 15:58:46 PDT 2025 x86_64 Intel(R) Xeon(R) CPU E3-1226 v3 @ 3.30GHz GenuineIntel GNU/Linux

Device database.db entry

{"id":35,"type":"Router","ieeeAddr":"0xa459bffffe5d54ee","nwkAddr":46362,"manufId":4714,"manufName":"Repenic Ltd.","powerSource":"Mains (single phase)","modelId":"RD-250ZG","epList":[1,242],"endpoints":{"1":{"profId":260,"epId":1,"devId":257,"inClusterList":[0,3,4,5,6,8,10,1794,2820,4096,57347,57348],"outClusterList":[25],"clusters":{"genBasic":{"attributes":{"modelId":"RD-250ZG","manufacturerName":"Repenic Ltd.","powerSource":1,"zclVersion":8,"appVersion":0,"stackVersion":0,"hwVersion":0,"dateCode":"20260720","swBuildId":"1.1.0"}},"genOnOff":{"attributes":{"onOff":0,"startUpOnOff":255}},"genLevelCtrl":{"attributes":{"40960":8,"40963":100,"40964":0,"45056":0,"currentLevel":29,"onLevel":255,"defaultMoveRate":3}},"haElectricalMeasurement":{"attributes":{"acPowerDivisor":100,"acPowerMultiplier":1,"acCurrentDivisor":100,"acCurrentMultiplier":1,"acVoltageDivisor":100,"acVoltageMultiplier":1,"activePower":0,"rmsCurrent":0,"rmsVoltage":22227}},"seMetering":{"attributes":{"divisor":100,"multiplier":1,"currentSummDelivered":69}}},"binds":[{"cluster":6,"type":"endpoint","deviceIeeeAddress":"0x00212effff06cb34","endpointID":1},{"cluster":8,"type":"endpoint","deviceIeeeAddress":"0x00212effff06cb34","endpointID":1},{"cluster":2820,"type":"endpoint","deviceIeeeAddress":"0x00212effff06cb34","endpointID":1},{"cluster":1794,"type":"endpoint","deviceIeeeAddress":"0x00212effff06cb34","endpointID":1}],"configuredReportings":[{"cluster":6,"attrId":0,"minRepIntval":0,"maxRepIntval":65000,"repChange":1},{"cluster":8,"attrId":0,"minRepIntval":5,"maxRepIntval":65000,"repChange":1},{"cluster":2820,"attrId":1291,"minRepIntval":10,"maxRepIntval":65000,"repChange":500},{"cluster":2820,"attrId":1288,"minRepIntval":10,"maxRepIntval":65000,"repChange":5},{"cluster":2820,"attrId":1285,"minRepIntval":10,"maxRepIntval":65000,"repChange":500},{"cluster":1794,"attrId":0,"minRepIntval":10,"maxRepIntval":65000,"repChange":10}],"meta":{}},"242":{"profId":41440,"epId":242,"devId":97,"inClusterList":[],"outClusterList":[33],"clusters":{},"binds":[],"configuredReportings":[],"meta":{}}},"appVersion":0,"stackVersion":0,"hwVersion":0,"dateCode":"20260720","swBuildId":"1.1.0","zclVersion":8,"interviewCompleted":true,"interviewState":"SUCCESSFUL","meta":{"configured":"0.0.0"},"lastSeen":1793715967130}

Debug log

No response

Notes
  • Both units are affected: 0xa459bffffe5d54ee and 0xa459bffffe5d600f.
  • Workaround: disable the start_brightness number entity in Home Assistant. This stops the errors without changing how the device behaves.
Dominant language
TypeScript
Stars
15.8k
Forks
2.2k
Avg merge
1d 14h
Merged PRs (30d)
37

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Koenkk/zigbee2mqtt

All issues in Koenkk/zigbee2mqtt

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.