-
-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hass(improvement): stop specific values from populating #732
Conversation
Pull Request Test Coverage Report for Build 596251330
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to move the check in discoverValue
function
wouldn't that iterate all values and just return, instead of stoping earlier? |
@billiaz discoverValue could also run 'on fly' and in that case this values will be discovered because you rely on the filter done by the prioritized cc function. |
🚧 It seems like this PR has lint errors 🚧
I should be able to fix them for you. If you want me to, just comment |
@zwave-js-bot fix lint |
// List of values | ||
const ignoreDiscovery = { | ||
Meter: ['previousValue', 'deltaTime'] | ||
} | ||
if (ignoreDiscovery[valueId.commandClassName]) { | ||
if (ignoreDiscovery[valueId.commandClassName].includes(valueId.property)) | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this but for now there are much other cc we are ignoring, IMO this check should be done inside the CC switch-case, like if(property === x || property === y) return
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thought of. looking if we have second class, otherwise i will move it under. the idea was to cover all
With zwavejs 7 deltaTime and previous value will not be available anymore so this can be closed |
Some values cause too much chatter in Hass, we remove these from discovery populating