Skip to content

Conversation

@ehbello
Copy link

@ehbello ehbello commented Dec 28, 2025

Proposed change

Adds support for the Arteco ZS-304Z (TS0601) soil moisture sensor (_TZE284_o9ofysmo).

This device provides:

  • Soil moisture (DP 3)
  • Temperature (DP 5)
  • Humidity (DP 101)
  • Illuminance (DP 102)
  • Battery state (DP 14, mapped to percentage remaining)

It also includes various configuration parameters:

  • Soil sampling interval (DP 103)
  • Calibration for soil, humidity, illuminance, and temperature (DPs 104-107)
  • Soil warning threshold (DP 110)
  • Water warning binary sensor (DP 111)

Additional information

image

Device diagnostics

zha-01KCVF5Y1M7D1DM1GHG4QQPBW9-_TZE284_o9ofysmo TS0601-dab25e8a31cf620cc69fcf8ffc1d34ce.json

Checklist

  • The changes are tested and work correctly
  • pre-commit checks pass / the code has been formatted using Black
  • Tests have been added to verify that the new code works
  • Device diagnostics data has been attached

Adds support for the Arteco ZS-304Z (TS0601) soil moisture sensor
(_TZE284_o9ofysmo).

This device provides:
- Soil moisture (DP 3)
- Temperature (DP 5)
- Humidity (DP 101)
- Illuminance (DP 102)
- Battery state (DP 14, mapped to percentage remaining)

It also includes various configuration parameters:
- Soil sampling interval (DP 103)
- Calibration for soil, humidity, illuminance, and temperature
  (DPs 104-107)
- Soil warning threshold (DP 110)
- Water warning binary sensor (DP 111)

Signed-off-by: Enrique Hernández Bello <[email protected]>
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.28%. Comparing base (35d1fc1) to head (d22f357).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #4602   +/-   ##
=======================================
  Coverage   92.28%   92.28%           
=======================================
  Files         371      371           
  Lines       12158    12159    +1     
=======================================
+ Hits        11220    11221    +1     
  Misses        938      938           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This test validates the `handle_get_data` method of the TuyaMCUCluster
for the Arteco ZS-304Z soil sensor (model `_TZE284_o9ofysmo`).
It ensures correct parsing and attribute mapping for several Tuya DPs:
- DP 3: Soil Moisture to `soil_moisture.measured_value`
- DP 5: Temperature to `temperature.measured_value`
- DP 14: Battery to `power.battery_percentage_remaining`
- DP 101: Humidity to `humidity.measured_value`
- DP 102: Illuminance to `illuminance.measured_value`

Signed-off-by: Enrique Hernández Bello <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Device Support Request] _TZE284_o9ofysmo Plant/Soil sensor

1 participant