[SNZB-02M / SONOFF] humidity_calibration default (0) outside declared HA range (5.0-95.0)
What happened?
Home Assistant continuously logs an ERROR because the device's humidity_calibration value falls outside the range Zigbee2MQTT declares for the corresponding HA number entity.
ERROR (MainThread) [homeassistant.components.mqtt.number] Invalid value for number.lounge_env_sensor_humidity_calibration: 0 (range 5.0 - 95.0)
The device reports humidity_calibration: 0 (its apparent factory default, meaning "no calibration offset"), but Zigbee2MQTT's exposed range for this entity starts at 5.0, so Home Assistant rejects the value every time the device reports.
What did you expect to happen?
The declared min/max range for humidity_calibration should include 0, since that represents "no offset" and is the device's default state. This looks like the same class of bug as #31280 (Aqara FP300 humidity_reporting_threshold too narrow for the device's own reported value).
How to reproduce it (minimal and precise)
Pair a SNZB-02M sensor. Observe humidity_calibration reports as 0 by default. Home Assistant logs the error on every device report.
Zigbee2MQTT version
2.13.0 (unknown)
Adapter firmware version
{"build":0,"ezsp":13,"major":7,"minor":5,"patch":1,"revision":"7.5.1 [GA]","special":0,"type":170}
Adapter
EmberZNet
Setup
os: #1 SMP PREEMPT_DYNAMIC Thu Jul 30 12:31:10 UTC 2026 - 6.18.39-haos - x64
node: v24.18.1
ha: true
Device database.db entry
No response
Debug log
No response
Notes
Device
definition: SNZB-02M - SONOFF (v0.0.0)
software_build_id: 1.0.2
date_code: 20260601
endpoints:
{"1":{"bindings":[{"cluster":"genPollCtrl","target":{"endpoint":1,"ieee_address":"0x70d07efffe8d15b3","type":"endpoint"}},{"cluster":"genPowerCfg","target":{"endpoint":1,"ieee_address":"0x70d07efffe8d15b3","type":"endpoint"}},{"cluster":"msTemperatureMeasurement","target":{"endpoint":1,"ieee_address":"0x70d07efffe8d15b3","type":"endpoint"}},{"cluster":"msRelativeHumidity","target":{"endpoint":1,"ieee_address":"0x70d07efffe8d15b3","type":"endpoint"}}],"clusters":{"input":["genBasic","genPowerCfg","genIdentify","genPollCtrl","msTemperatureMeasurement","msPressureMeasurement","msRelativeHumidity","manuSpecificAmazonWWAH","customClusterEwelink"],"output":["genOta"]},"configured_reportings":[{"attribute":"batteryPercentageRemaining","cluster":"genPowerCfg","maximum_report_interval":65000,"minimum_report_interval":3600,"reportable_change":10},{"attribute":"measuredValue","cluster":"msTemperatureMeasurement","maximum_report_interval":3600,"minimum_report_interval":5,"reportable_change":20},{"attribute":"measuredValue","cluster":"msRelativeHumidity","maximum_report_interval":3600,"minimum_report_interval":5,"reportable_change":100}],"scenes":[]}}
Health
time: Sat Aug 08 2026 13:40:23 GMT+0100 (British Summer Time)
os.load_average: 0, 0, 0
os.memory_percent: 18.7443
process.memory_percent: 1.8769
process.uptime_sec: 5403
{"leave_count":0,"messages":18,"messages_per_sec":0.0038,"network_address_changes":0}
@cubez2mdeveloper could you check this?
Hi @nebbit32 , thanks for reporting this issue.
We are aware of this problem and have added it to our internal tracking. We will schedule a fix for it in a future update.
Thanks for your patience and understanding.
Experiencing same log flooding. Identical hard/soft version numbers as nebbit32 (thanks for flagging!).
Seeing the same on the SNZB-02M (manufacturer code 4742, swBuildId 1.0.2), Z2M 2.13.0.
Does temperature_calibration have the same bug? Its valueMin is -20, so
the same 0 happens to fall inside the permitted range. pressure_calibration
(-400…400, ) is fine.
Same here. Getting logs filled up with this error from same device. Thanks for logging the issue Joel
@CubeZ2mDeveloper can we just not simply set the range minimum to 0?
At a guess, the bug is that pressure and temp cal should both be an offset, but the range is coming back incorrect. Alternatively (willing to be proved wrong), the 0 is some sort of disabled magic value
Hi, thanks for reporting this.
The calibration value is an offset, so it can be either positive or negative. We will update the calibration ranges to correctly reflect the supported offset values:
- Temperature and humidity calibration: -50 to +50
- Pressure calibration: -200 to +200
Please be patient while we work on updating this. Thanks for your understanding!