fix(sensor): dynamic discovery for WHO 1 light/motion sensors and ghost light prevention (#244) - #245
Merged
GreenGrassBlueOcean merged 1 commit intoSep 9, 2026
Conversation
…st light prevention (#244)
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
Fixes #244.
Follow-up to feedback from @anotherjulien on #232 (comment).
Legrand 048834 / WHO 1 motion & illuminance sensors broadcast under WHO=1 (Lighting). Previously, frames from these devices were treated as lighting telegrams, causing them to be discovered as ghost
lightentities sharing the same A/PL address. Furthermore, motion frames (WHAT = 34) and illuminance dimension messages (DIMENSION = 6) were not properly interpreted.Changes Made
OWNLightingEvent Classification (
ownd/message.py):is_sensorproperty identifying motion (WHAT=34), illuminance (DIMENSION=6), sensitivity (DIMENSION=5), and timeout (DIMENSION=7) frames.is_onto ensure sensor messages (WHAT=34) do not evaluate as lightON._NONCEpattern (\d{5,}) to avoid colliding with*#5##and*#9##.Light Entity Filtering & Registry Purge (
light.py):lightentities when WHO 1 sensor activity is detected on their address.Motion Sensor Discovery & Routing (
binary_sensor.py):MyHOMEMotionSensorfor WHO 1 on*1*34*WHERE##.Illuminance Sensor Integration (
sensor.py):MyHOMEIlluminanceSensorinto the Phase 1 sensor architecture.*#1*WHERE*6*LUX##).Test Coverage: