Add native Z-Wave JS integration

This commit is contained in:
2026-05-05 13:09:56 +00:00
parent 97cba0a9a1
commit 2823a1c718
12 changed files with 1003 additions and 36 deletions
@@ -0,0 +1,18 @@
import { expect, tap } from '@git.zone/tstest/tapbundle';
import { createZwaveJsDiscoveryDescriptor } from '../../ts/integrations/zwave_js/index.js';
tap.test('matches Z-Wave JS Server mDNS records', async () => {
const descriptor = createZwaveJsDiscoveryDescriptor();
const matcher = descriptor.getMatchers()[0];
const result = await matcher.matches({
type: '_zwave-js-server._tcp.local.',
name: 'Z-Wave JS._zwave-js-server._tcp.local.',
host: 'zwave.local',
port: 3000,
}, {});
expect(result.matched).toBeTrue();
expect(result.candidate?.host).toEqual('zwave.local');
expect(result.candidate?.metadata?.url).toEqual('ws://zwave.local:3000');
});
export default tap.start();