-
Notifications
You must be signed in to change notification settings - Fork 712
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
_VALID_ATTRIBUTES
to LocalDataCluster, fix Tuya datapoint mappi…
…ngs on LocalDataClusters (#3415) * Add `_VALID_ATTRIBUTES` to `LocalDataCluster` This list should be populated with the attribute ids of attributes that will not be populated at first, but only later. All attribute reads on the `LocalDataCluster` for those specified attributes will return `None` with success status when no value is in the attribute cache. This allows ZHA entity creation for those entities (except some configuration entities that explicitly check for `None` attributes). If they are not in the valid attributes list, they will retain the previous behavior returning as "unsupported attribute". This prevents ZHA entity creation for those attributes. * Add test checking reading attributes on `LocalDataCluster` This adds a test which checks if the reading of the following works as expected on a `LocalDataCluster`: - invalid attribute reading returning unsupported - constant attribute reading working - valid attribute reading returning `None` with success status * Mark attributes from Tuya datapoint mappings on `LocalDataCluster`s as valid This allows entities in ZHA to be created, as the initial attribute reads will return `None` with success status, instead of "unsupported attribute".
- Loading branch information
1 parent
93af47a
commit fff11ff
Showing
3 changed files
with
77 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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