Skip to content

Soil moisture sensor - Arteco ZS-304Z soil_warning definition incorrect (HA "is not a Number" log errror) #30747

Description

@djgrazzy

What happened?

I have this soil moisture meter identified as https://www.zigbee2mqtt.io/devices/ZS-304Z.html#arteco-zs-304z
Initial value in mqtt is
"soil_warning": null,
attemting to set it to 10 via the zigbee2mqtt web gui results in mqtt showing
"soil_warning": false,

Publishing zigbee2mqtt/FRIENDLY_NAME/set with payload {"soil_warning": 10}
mqtt remains as "soil_warning": false,

Error in Home assistant logs

Payload '{"battery_state":"middle","humidity":67,"humidity_calibration":0,"illuminance":5,"illuminance_calibration":0,"last_seen":"2026-01-22T15:53:02+11:00","linkquality":131,"soil_calibration":0,"soil_moisture":42,"soil_sampling":"","soil_warning":false,"temperature":23.2,"temperature_calibration":0,"water_warning":"none"}' is not a Number

What did you expect to happen?

Per zigbee2mqtt.io
Value should report set value 0-100.

Soil warning (numeric)
Soil water shortage humidity value. Value can be found in the published state on the soil_warning property. It's not possible to read (/get) this value. To write (/set) a value publish a message to topic zigbee2mqtt/FRIENDLY_NAME/set with payload {"soil_warning": NEW_VALUE}. The minimal value is 0 and the maximum value is 100. The unit of this value is %.

I believe this is supposed to change the behaviour of "Water warning" states of "none" and "alarm".

Water warning (enum)
Water shortage warning. Value can be found in the published state on the water_warning property. It's not possible to read (/get) or write (/set) this value. The possible values are: none, alarm.

Battery state (enum)

How to reproduce it (minimal and precise)

initialise device, wait for initial values to come through and or publish zigbee2mqtt/FRIENDLY_NAME/set with payload {"soil_warning": 10}

Zigbee2MQTT version

2.7.2

Adapter firmware version

20220219

Adapter

Sonoff Zigbee 3.0 USB Dongle P

Setup

Home Assistant OS Addon, VM with USB passthrough

Device database.db entry

No response

Debug log

[1/22/2026, 3:59:22 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Plant Sensor - Heart Leaf Philodendron', payload '{"battery_state":"middle","humidity":70,"humidity_calibration":0,"illuminance":5,"illuminance_calibration":0,"last_seen":"2026-01-22T15:59:23+11:00","linkquality":109,"soil_calibration":0,"soil_moisture":44,"soil_sampling":"","soil_warning":false,"temperature":22.9,"temperature_calibration":0,"water_warning":"none"}'
[1/22/2026, 3:59:22 PM] z2m:mqtt: MQTT publish: topic 'zigbee2mqtt/Plant Sensor - Heart Leaf Philodendron', payload '{"battery_state":"middle","humidity":70,"humidity_calibration":0,"illuminance":5,"illuminance_calibration":0,"last_seen":"2026-01-22T15:59:23+11:00","linkquality":112,"soil_calibration":0,"soil_moisture":45,"soil_sampling":"","soil_warning":false,"temperature":22.9,"temperature_calibration":0,"water_warning":"none"}'

Notes

I have not updated my coordinator firmware in a long time, possible cause?

Metadata

Metadata

Assignees

No one assigned

    Labels

    problemSomething isn't workingstaleStale issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions