fix: add 'far' movement state value to ZG-205W mmWave presence sensor#5411
Merged
make-all merged 1 commit intoJun 25, 2026
Merged
Conversation
The ZG-205W/ZG-205Z mmWave presence sensor can emit 'far' as a DPS 116 value in addition to the existing large_move, small_move, breathe, none. This value appears to represent stationary presence detected at far range (beyond the active motion zone). Without this mapping, tuya-local passes the raw 'far' string to HA, which raises a ValueError because 'far' is not in the declared enum options, producing repeated errors in the HA log. Observed on firmware version in use with ZG-205Z sensors (same hardware, same DPS mapping).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The ZG-205W (and ZG-205Z, which uses the same DPS mapping) mmWave presence sensor occasionally emits
faras the DPS 116 value in addition to the already-mappedlarge_move,small_move,breathe, andnone.Problem
Without a mapping for
far, tuya-local passes the raw string through to Home Assistant's enum sensor. HA then raises aValueErroron every update that sends this value:This produces repeated errors in the HA log and leaves the sensor in an unavailable/unknown state whenever the device reports
far.Fix
Add
far→Farto the DPS 116 mapping. Based on the sensor's near/far detection zones, this value appears to represent stationary presence detected at far range (beyond the active motion zone).Testing
Observed on ZG-205Z sensors (same DPS layout as ZG-205W) running current firmware. After adding this mapping, the
ValueErrorno longer appears in HA logs and the sensor reportsFarcorrectly.