You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
WN31 (and other channel sensors) silently drop one channel when two sensors share the same hardware ID: If two physical sensors of the same type (e.g. two WN31 temperature/humidity sensors) report an identical hardware ID to the gateway — which can happen as a factory defect or after a battery replacement — only one of the two channels would appear in Home Assistant. The _sensor_info dictionary, keyed by hardware ID, was overwritten by whichever channel was processed last, causing both channels to generate the same entity ID and only the final one to survive. The fix pre-scans the get_sensors_info response to detect hardware IDs that appear on multiple channels. When a duplicate is found, a composite identifier ({hardware_id}_ch{channel}, e.g. B8_ch3 and B8_ch5) is used for each channel, so both sensors get distinct HA devices and entity IDs. Non-duplicate sensors are unaffected. (issue #211)