From d5c8fd812f43ad86b859cb39c30e28449d889184 Mon Sep 17 00:00:00 2001
From: Florian Hotze <florianh_dev@icloud.com>
Date: Tue, 24 Dec 2024 00:57:28 +0100
Subject: [PATCH] README: Improve rule builder trigger builder docs (#411)

Closes #400.

Signed-off-by: Florian Hotze <dev@florianhotze.com>
---
 README.md | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/README.md b/README.md
index d602bbfb..12ab24ad 100644
--- a/README.md
+++ b/README.md
@@ -1319,27 +1319,27 @@ See [Examples](#rule-builder-examples) for further patterns.
   - `.cron(cronExpression)`: Specifies a cron schedule for the rule to fire.
   - `.timeOfDay(time)`: Specifies a time of day in `HH:mm` for the rule to fire.
   - `.item(itemName)`: Specifies an Item as the source of changes to trigger a rule.
-    - `.for(duration)`
-    - `.from(state)`
-    - `.fromOn()`
-    - `.fromOff()`
-    - `.to(state)`
-    - `.toOn()`
-    - `.toOff()`
-    - `.receivedCommand()`
-    - `.receivedUpdate()`
-    - `.changed()`
+    - `.receivedCommand()`, `.receivedUpdate()`, `.changed()` allows to define the received command/update, respective new state:
+      - `.of(command)`
+      - `.to(state)`
+      - `.toOn()`
+      - `.toOff()`
+    - `.changed()` allows to define the previous state and a duration for which the Item must have changed:
+      - `.from(state)`
+      - `.fromOn()`
+      - `.fromOff()`
+      - `.for(duration)` where duration is in milliseconds
   - `.memberOf(groupName)`: Specifies a group Item as the source of changes to trigger the rule.
-    - `.for(duration)`
-    - `.from(state)`
-    - `.fromOn()`
-    - `.fromOff()`
-    - `.to(state)`
-    - `.toOn()`
-    - `.toOff()`
-    - `.receivedCommand()`
-    - `.receivedUpdate()`
-    - `.changed()`
+    - `.receivedCommand()`, `.receivedUpdate()`, `.changed()` allows to define the received command/update, respective new state:
+      - `.of(command)`
+      - `.to(state)`
+      - `.toOn()`
+      - `.toOff()`
+    - `.changed()` allows to define the previous state and a duration for which the Item must have changed:
+      - `.from(state)`
+      - `.fromOn()`
+      - `.fromOff()`
+      - `.for(duration)` where duration is in milliseconds
   - `.system()`: Specifies a system event as a source for the rule to fire.
     - `.ruleEngineStarted()`
     - `.rulesLoaded()`
@@ -1349,9 +1349,9 @@ See [Examples](#rule-builder-examples) for further patterns.
     - `.startLevel(level)`
   - `.thing(thingName)`: Specifies a Thing event as a source for the rule to fire.
     - `changed()`
+      - `from(state)`
+      - `to(state)`
     - `updated()`
-    - `from(state)`
-    - `to(state)`
   - `.dateTime(itemName)`: Specifies a DateTime Item whose (optional) date and time schedule the rule to fire.
     - `.timeOnly()`: Only the time of the Item should be compared, the date should be ignored.
     - `.withOffset(offset)`: The offset in seconds to add to the time of the DateTime Item.