Update migration.md (#1022)
* Update migration.md added hint to use Karaf console commands to simulate events in rules * Update migration.md * Added newlines Signed-off-by: Jerome Luckenbach <github@luckenba.ch>pull/1027/head
parent
918d4ed40e
commit
456b53da68
|
@ -398,6 +398,13 @@ cp $OPENHAB1_CONF/configurations/sitemaps/* $OPENHAB_CONF/sitemaps/*
|
|||
Add 'legend=true' to restore the chart's legend.
|
||||
|
||||
### Rules
|
||||
|
||||
Test your rules using commands in Karaf console.
|
||||
Use smarthome:send to send a command, smarthome:update to update an Item's state, and smarthome:status to get an Item's state.
|
||||
Use smarthome --help for more details.
|
||||
These can be used to simulate events that can trigger a rule, even in an installation without "active" devices.
|
||||
|
||||
Potential pitfalls in rules code:
|
||||
* All references to org.openhab.* in imports and class references should be removed. All of these classes are automatically included and have moved.
|
||||
* import org.joda.time.* statements should also be removed, they are also included by default.
|
||||
* To test for Items with an Undefined state replace `if(MyItem.state == Undefined)` with `if(MyItem.state == NULL)`.
|
||||
|
|
Loading…
Reference in New Issue