Skip to content

fix: device detector roles for smoke and water leak sensors - #3056

Merged
asgothian merged 3 commits into
ioBroker:masterfrom
Schimi1983:fix/alarm-roles
Nov 21, 2026
Merged

asgothian merged 3 commits into
ioBroker:masterfrom
Schimi1983:fix/alarm-roles

Conversation

@Schimi1983

Copy link
Copy Markdown
Contributor

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 generic state)
  • water_leak (state detected) → sensor.alarm.flood (was indicator)

The type-detector patterns fireAlarm and floodAlarm require /^(state|sensor|indicator)(\.alarm)?\.fire$/ resp. …\.flood$/. With state/indicator smoke 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, fault stay state), 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

- 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
@asgothian

Copy link
Copy Markdown
Collaborator

Please add an appropriate section to the change log in the read me.

A.

@Schimi1983

Copy link
Copy Markdown
Contributor Author

Done – added to the changelog under ### **WORK IN PROGRESS**. Since 3.6.1 was released in the meantime, I merged the current master into the branch first, so the README has no conflict.

@asgothian
asgothian merged commit 008f4de into ioBroker:master Nov 21, 2026
11 checks passed
@Schimi1983
Schimi1983 deleted the fix/alarm-roles branch November 21, 2026 16:27
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.

2 participants