Module: OpenHAB::DSL::Rules::Terse

Included in:
OpenHAB::DSL, Builder
Defined in:
lib/openhab/dsl/rules/terse.rb

Overview

If you have a single trigger and execution block, you can use a terse rule: All parameters to the trigger are passed through, and an optional ‘name:` parameter is added.

Examples:

changed TestSwitch do |event|
  logger.info("TestSwitch changed to #{event.state}")
end
received_command TestSwitch, name: "My Test Switch Rule", command: ON do
  logger.info("TestSwitch received command ON")
end

Instance Method Summary collapse

Instance Method Details

#changedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



67
# File 'lib/openhab/dsl/rules/terse.rb', line 67

def_terse_rule(:changed)

#channelObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



68
# File 'lib/openhab/dsl/rules/terse.rb', line 68

def_terse_rule(:channel)

#channel_linkedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



69
# File 'lib/openhab/dsl/rules/terse.rb', line 69

def_terse_rule(:channel_linked)

#channel_unlinkedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



70
# File 'lib/openhab/dsl/rules/terse.rb', line 70

def_terse_rule(:channel_unlinked)

#cronObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



71
# File 'lib/openhab/dsl/rules/terse.rb', line 71

def_terse_rule(:cron)

#everyObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



72
# File 'lib/openhab/dsl/rules/terse.rb', line 72

def_terse_rule(:every)

#item_addedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



73
# File 'lib/openhab/dsl/rules/terse.rb', line 73

def_terse_rule(:item_added)

#item_removedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



75
# File 'lib/openhab/dsl/rules/terse.rb', line 75

def_terse_rule(:item_removed)

#item_updatedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



74
# File 'lib/openhab/dsl/rules/terse.rb', line 74

def_terse_rule(:item_updated)

#on_startObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



76
# File 'lib/openhab/dsl/rules/terse.rb', line 76

def_terse_rule(:on_start)

#received_commandObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



77
# File 'lib/openhab/dsl/rules/terse.rb', line 77

def_terse_rule(:received_command)

#thing_addedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



78
# File 'lib/openhab/dsl/rules/terse.rb', line 78

def_terse_rule(:thing_added)

#thing_removedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



80
# File 'lib/openhab/dsl/rules/terse.rb', line 80

def_terse_rule(:thing_removed)

#thing_updatedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



79
# File 'lib/openhab/dsl/rules/terse.rb', line 79

def_terse_rule(:thing_updated)

#updatedObject

*args, id: nil, name :nil, description: nil, tag: nil, tags: nil, on_load: false, **kwargs, &block)



81
# File 'lib/openhab/dsl/rules/terse.rb', line 81

def_terse_rule(:updated)