[Feature request]: Expose 'actual_irrigation_amount' as a standalone sensor for Sonoff SWV / Zigbee Smart Water Valve
Is your feature request related to a problem? Please describe
I am using the Sonoff SWV (SWV-ZFE) Zigbee Smart Water Valve in Home Assistant via Zigbee2MQTT. Currently, the real-time water consumption for the active irrigation cycle is nested inside the JSON string payload of irrigation_schedule_status under the key actual_irrigation_amount.
Because Home Assistant has a strict 255-character limit for entity states, long JSON strings pushed directly as state values get truncated.
Furthermore, the currently exposed x_real_time_irrigation_volume sensor is misleadingly named: it behaves as a daily total volume (resets at midnight and updates every 5 minutes) rather than showing the actual real-time volume of the ongoing cycle.
Describe the solution you'd like
It would be great if Zigbee2MQTT could expose actual_irrigation_amount directly as a standalone sensor (e.g. sensor.<device>_actual_irrigation_amount with unit L).
Having this as a dedicated sensor would:
- Avoid truncation issues caused by the HA 255-character state limit;
- Allow users to easily track exact real-time water consumption during each irrigation run and use it natively in Home Assistant dashboards or automations.
Describe alternatives you've considered
Currently using string-splitting workaround templates in Home Assistant to extract 'actual_irrigation_amount' from the truncated irrigation_schedule_status state, which is fragile and inefficient.
If anyone needs to extract the real-time value from the truncated state (e.g., using custom:template-entity-row or a template sensor), you can use this extraction logic:
{% set value = states('sensor.irrigazione_giardino_irrigation_schedule_status') %}
{% if 'actual_irrigation_amount' in value %}
{{ value.split("'actual_irrigation_amount': ")[1].split(',')[0] | trim }} L
{% else %}
N/D
{% endif %}
Additional context
Device information
- Device Model: SONOFF SWV / SWV-ZFE (Zigbee Smart Water Valve)
- Integration: Zigbee2MQTT
I think it's a good idea to drop the composite irrigation_schedule_status entity, and expose its children directly. cc @cubez2mdeveloper
It's sufficient to give the sensors the same prefix, so they stay together when ordered alphabetically:
status_schedule_statusstatus_schedule_indexstatus_schedule_typestatus_irrigation_mode- ...
Applications like Home Assistant need to split composites anyway. Otherwise they can not make use of them. So I think it's better to split them in Z2M directly.
I use composites only for configuration, when multiple options can not be changed individually (they are part of the same Zigbee command/attribute). Like "relay inching" is a good example: enabled + mode + time
Hi @simonevisciano , sorry for the delayed reply, and thank you for your feedback and suggestion.
We understand your request regarding exposing actual_irrigation_amount as a separate entity, which could provide a more convenient way to access this information in Home Assistant.
We have forwarded your suggestion to our product team for further evaluation and consideration. We appreciate your valuable feedback, which helps us improve the user experience.
Thank you for your patience and support.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days