Conditions

 

 

A condition defines an additional check that needs to be performed before executing the scenario. This condition can check the current state of a device or other factors. The condition is an optional component, and if it is present, the execution of the scenario will depend on its result.

Example implementation of a condition handler:

automationCondition = (entityId)->
    entity = EntityGetState(entityId)
    if !entity || !entity.state 
        return false
    if entity.state.name == 'ON'
        return true
    return false
Last modified February 5, 2024: Merge pull request #270 from e154/master (7108cb6)