variable dayNightThreshold

Codec for <DayNightThreshold>.

Examples

Set a custom threshold

import { assertStringIncludes } from "@std/assert";
import { dayNightThreshold } from "@hertzg/reolink-api/protocol/params";

const xml = dayNightThreshold.encode({
  channelId: 0,
  threshold: "custom",
  thresholdval: { cur: 60 },
});

assertStringIncludes(xml, "<thresholdval><cur>60</cur></thresholdval>");

Type

XmlParam<"DayNightThreshold", DayNightThreshold>

Usage

import { dayNightThreshold } from "protocol/params/mod.ts";