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)



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

def_terse_rule(:changed)

#channelObject

*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(:channel)

#channel_linkedObject

*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(:channel_linked)

#channel_unlinkedObject

*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(:channel_unlinked)

#cronObject

*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(:cron)

#everyObject

*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(:every)

#item_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(:item_added)

#item_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(:item_removed)

#item_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(:item_updated)

#on_startObject

*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(:on_start)

#received_commandObject

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



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

def_terse_rule(:received_command)

#thing_addedObject

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



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

def_terse_rule(:thing_added)

#thing_removedObject

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



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

def_terse_rule(:thing_removed)

#thing_updatedObject

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



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

def_terse_rule(:thing_updated)

#updatedObject

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



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

def_terse_rule(:updated)