Repository navigation
fix: device detector roles for smoke and water leak sensors - #3056
Merged
Merged
Conversation
- smoke: own role 'sensor.alarm.fire' (was the generic 'state')
- water_leak ('detected'): 'sensor.alarm.flood' (was 'indicator')
These are the roles the type-detector expects for fireAlarm and
floodAlarm, so smoke and water leak sensors are now detected as such by
devices, material, iot and other device detector based adapters.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Q82LhA9wBMqm1L1powvy6
Collaborator
|
Please add an appropriate section to the change log in the read me. A. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Q82LhA9wBMqm1L1powvy6
Contributor
Author
|
Done – added to the changelog under |
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.
Targeted follow-up to #3055, as suggested there: only the roles the type-detector expects, nothing generic.
Change (4 lines in
lib/exposes.js, binary exposes by name)smoke→sensor.alarm.fire(was the genericstate)water_leak(statedetected) →sensor.alarm.flood(wasindicator)The type-detector patterns
fireAlarmandfloodAlarmrequire/^(state|sensor|indicator)(\.alarm)?\.fire$/resp.…\.flood$/. Withstate/indicatorsmoke and water leak sensors were not recognised by devices, material, iot etc.; now they are. IDs, types and values are unchanged; existing objects get the role at the next start.Tested on my installation (2 smoke detectors, 1 water leak sensor, this branch installed): the three states have
sensor.alarm.fire/sensor.alarm.flood, all other roles are as on master (e.g.child_lock,faultstaystate), no warnings/errors in the log.Install for testing:
https://github.com/Schimi1983/ioBroker.zigbee/tarball/fix/alarm-roles🤖 Generated with Claude Code
https://claude.ai/code/session_013Q82LhA9wBMqm1L1powvy6