You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When `trig1` fires, inputs.get("module") is `"trig1"`.
598
+
The table below `core.ItemStateChangeTrigger` shows that five keys and values will be inserted into `inputs`.
599
+
The values are inserted twice: once with the trigger id prefix followed by dot in the key, once without.
600
+
That is, `inputs` will have eleven keys and six values: `inputs.get("module")`, `inputs.get("oldState") == inputs.get("trig1.oldState")`, `inputs.get("newState") == inputs.get("trig1.newState")`, `inputs.get("lastStateUpdate") == inputs.get("trig1.lastStateUpdate")`, `inputs.get("lastStateChange") == inputs.get("trig1.lastStateChange")` and `inputs.get("event") == inputs.get("trig1.event")`.
|`command`| The received command. The value’s type of this key depends on item’s type and cannot be `UnDefType`, e.g. for a `StringItem` the type of `command` is `StringType`, and for `SwitchItem` type is `OnOffType`. |
576
659
577
660
:::
578
661
@@ -583,6 +666,14 @@ Read the JSR223 language specific documentation for examples of using these `Tri
|`lastStateUpdate`| The time of the previous state update [`java.time.ZonedDateTime`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/ZonedDateTime.html) - since openHAB 5.0. The value is `null`, when the item was just initialized. |
676
+
586
677
:::
587
678
588
679
::: details core.ItemStateChangeTrigger
@@ -593,6 +684,16 @@ Read the JSR223 language specific documentation for examples of using these `Tri
593
684
|`previousState`| The previous `State` (optional) |
|`oldState`| The old item [`org.openhab.core.types.State`](https://www.openhab.org/javadoc/latest/org/openhab/core/types/state). The value is `UnDefType.NULL`, when the item was just initialized. |
692
+
|`newState`| The new item [`org.openhab.core.types.State`](https://www.openhab.org/javadoc/latest/org/openhab/core/types/state)|
693
+
|`lastStateUpdate`| The time of the previous state update [`java.time.ZonedDateTime`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/ZonedDateTime.html) - since openHAB 5.0. The value is `null`, when the item was just initialized. |
694
+
|`lastStateChange`| The time of the previous state change [`java.time.ZonedDateTime`](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/time/ZonedDateTime.html) - since openHAB 5.0. The value is `null`, when the item was just initialized. |
0 commit comments