itemutils

Namespace

itemutils

Description:
  • Items namespace

    This namespace provides tools for Items.

Source:

Classes

GroupUtils

Methods

(static) dimItem(itemName, targetState, step, time, ignoreExternalChangeopt, overwriteopt)

Description:
  • Dims an Item step-by-step to a target state.

    Only works for Items with support for float states. The dimmer uses the shared cache to ensure that there are not multiple timers for the same Item active at the same time.

Source:
Example
// Dim the Bedroom_Light to 50% in 750 seconds (1% each 15 seconds).
itemutils.dimItem('Bedroom_Light', 50.0, 1, 15 * 1000);
Parameters:
Name Type Attributes Default Description
itemName string

name of the Item to control

targetState number

float number to dim to

step number

dimming step size

time number

time in milliseconds between each step

ignoreExternalChange boolean <optional>
false

whether to break dimmer if Item receives a large external change

overwrite boolean <optional>
false

whether to cancel an existing dimmer and create a new one

Throws:

when a parameter has wrong type

Type
TypeError

(static) getGroupUtils(groupName) → {GroupUtils}

Description:
  • Gets an instance of groupUtils.

Source:
Parameters:
Name Type Description
groupName string

the name of the group

Returns:
Type
GroupUtils