Codec for <Support>.
Read the smart home assistants
Read the smart home assistants
import { assertEquals } from "@std/assert"; import { parse } from "@std/xml"; import { support } from "@hertzg/reolink-api/protocol/params"; const smartHome = parse( "<p><smartHome><version>1</version><item><name>googleHome</name>" + "<ver>2</ver></item></smartHome></p>", ).root; assertEquals(support.fields.smartHome.decode("smartHome", smartHome), { version: 1, item: [{ name: "googleHome", ver: 2 }], });