Skip to content

ValueCondition

Bases: object

ValueCondition class defines a condition based on a sub-device value.

Represents a condition where a sub-device must meet a certain value criterion for a recipe element to be executed.

__init__(*args)

Overload 1:

Constructor with sub-device ID and condition.

Initializes a new instance of the ValueCondition class with a sub-device ID and a condition string.

Parameters:

Name Type Description Default
subDeviceId SubDeviceId

The associated sub-device ID of the value Condition

required
condition string

The value condition | Overload 2: Default constructor. Initializes a new instance of the ValueCondition class.

required

getSubDeviceId()

Get the sub-device ID.

Retrieves the ID of the sub-device associated with this condition.

Returns:

Type Description
SubDeviceId

The sub-device ID

setSubDeviceId(subDeviceId)

Set the sub-device ID.

Sets the ID of the sub-device associated with this condition.

Parameters:

Name Type Description Default
subDeviceId SubDeviceId

The sub-device ID

required

getCondition()

Get the condition.

Retrieves the condition associated with this value condition.

Returns:

Type Description
str

The condition

setCondition(condition)

Set the condition.

Sets the condition associated with this value condition.

Parameters:

Name Type Description Default
condition string

The condition

required