-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Allow exposes
in ModernExtend
interface to be a function
#7683
Conversation
@Koenkk Huh, that's interesting... |
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
@Koenkk Hmm, we still have some type mismatches here and there... We don't necessarily have to change the interface, IMHO. |
I've implemented it in 059dfb8 now, so this can be closed. |
@Koenkk Oh nice, thank you! |
@Koenkk What do you think, did I get that bmct: (): ModernExtend => {
const fromZigbee: Fz.Converter[] = [
// ...
];
const toZigbee: Tz.Converter[] = [
// ...
];
const exposes: DefinitionExposesFunction[] = [
(device: Device, options: KeyValue): Expose[] => {
const expose: Expose[] = [
e.linkquality(),
];
// Doesn't use 'device' yet, but you get the idea.
return expose;
},
];
return {
fromZigbee,
toZigbee,
exposes,
isModernExtend: true,
};
}, |
Yes this looks good, does it work? |
@Koenkk We'll know soon enough! |
Already works in
Definition
, now it does inModernExtend
as well!Context here: #7444 (comment)