Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WithAttributesDefinition

An in-progress HubitatDeviceTriggerDefinition builder class.

Hierarchy

Index

Properties

Accessors

Methods

Properties

Protected triggerDefinition

Accessors

and

or

Methods

andWhere

  • Allows to specify another attributes filter to make the trigger more specific.

    example

    A single attribute name:

    readonly triggers = [
      HubitatDeviceTrigger.for(44)
        .where('level').is(100)
        .andWhere('switch').was('off'),
    ];
    example

    Where 3 attribute names are accepted:

    readonly triggers = [
      HubitatDeviceTrigger.for(206)
        .where('level').isNot(100)
        .andWhere('switch', 'level', 'temperature').changed(),
    ];

    Parameters

    • attributeName: string

      A name of the attribute to accepts events from. You can specify more allowed attribute names using the otherAttributesNames.

    • Rest ...otherAttributesNames: string[]

      Other attribute names in case you want to allow device events related to more than one attribute. Optional.

    Returns AwaitChangeFilterDefinition

Generated using TypeDoc