-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Сhanged priority to use external converters #1821
Conversation
findByZigbeeModel and findByDevice return last candidate of all possible
Trailing spaces removed
Instead of doing this I prefer to add an additional parameter to zigbee-herdsman-converters/index.js Line 39 in 3ec3075
addInFront (default false) and set that to true here: https://github.com/Koenkk/zigbee2mqtt/blob/master/lib/extension/externalConverters.js#L13
|
And then, at zigbee-herdsman-converters/index.js Line 59 in 3ec3075
zigbee-herdsman-converters/index.js Line 68 in 3ec3075
Ok I'l work on it later. |
Add an additional parameter to addDefinition called addInFront (default false)
Add an additional parameter to addDefinition called addInFront (default false)
Add an additional parameter to addDefinition called addInFront (default false)
I tried, but I'm not so good at tests writing. |
Why do we need to do this? Why not let to override internal converter by default? This behaviour is quite safe, since user need to do two steps:
If we implement loading in this way, then we just need to pick last registered converter: zigbee-herdsman-converters/index.js Line 65 in 8466c08
|
I started from made returning last candidate of all possible, it is the easiest way to implement this function. |
How about findByDevice() ? |
Yes, apply this logic everywhere where it necessary. I just gave small example |
findByZigbeeModel and findByDevice return last candidate of all possible
returned everything as it was originally in the commit e064dd9 |
Thanks! |
findByZigbeeModel and findByDevice return last candidate of all possible
Please check is it possible to do like this?
I got everything working.