Fix AVM DECT440 on older FRITZ!OS#104
Draft
olaf-mandel wants to merge 1 commit intohthiery:masterfrom
Draft
Conversation
On FRITZ!OS < 7.20, the DECT440 is reported with `functionsbitmask` containing the `HUMIDITY` feature, but the device-node does not actually contain that element. So patch the `functionsbitmask` if that situation is detected.
mib1185
requested changes
Jan 19, 2025
Comment on lines
+45
to
+50
| # Workaround for broken AVM FRITZ!DECT 440 in FRITZ!OS < 7.20 | ||
| if (node.attrib["manufacturer"] == "AVM" | ||
| and node.attrib["productname"] == "FRITZ!DECT 440" | ||
| and node.find("humidity") is None): | ||
| self._functionsbitmask &= ~int(FritzhomeDeviceFeatures.HUMIDITY) | ||
|
|
Collaborator
There was a problem hiding this comment.
Suggested change
| # Workaround for broken AVM FRITZ!DECT 440 in FRITZ!OS < 7.20 | |
| if (node.attrib["manufacturer"] == "AVM" | |
| and node.attrib["productname"] == "FRITZ!DECT 440" | |
| and node.find("humidity") is None): | |
| self._functionsbitmask &= ~int(FritzhomeDeviceFeatures.HUMIDITY) | |
| # Workaround for broken AVM FRITZ!DECT 440 in FRITZ!OS < 7.24 | |
| if (self._has_feature(FritzhomeDeviceFeatures.HUMIDITY) | |
| and node.find("humidity") is None): | |
| self._functionsbitmask &= ~int(FritzhomeDeviceFeatures.HUMIDITY) |
we should never rely on product or manufacturer names, they can change (see the latest issues with SMA devices after fritzbox update which changed the device names of all dect products)
Please test if this suggestions works for you
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.
On FRITZ!OS < 7.20, the DECT440 is reported with
functionsbitmaskcontaining theHUMIDITYfeature, but the device-node does not actually contain that element. So patch thefunctionsbitmaskif that situation is detected.