writeValue

Write a value to another tag from a virtual tag script.

Available in read and write scripts. Part of the virtual tag expression reference.

Writes a value to another, writable tag. Most often used in a write script to forward the incoming value to a real tag.

writeValue(tagPath: string, value: any): void;

Parameters

  • tagPath — the path to the tag to write to. It must be writable.
  • value — the value to write.

Return value

None.

Example

// In a write script: scale a 0–100 % input to a 0–10 V setpoint
writeValue("AHU/Fan", (inputValue() / 100) * 10);