File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -500,6 +500,7 @@ from openhab import Registry
500500| getThings | Registry.getThings() | Array of [ openHAB Things] ( https://www.openhab.org/javadoc/latest/org/openhab/core/thing/thing ) |
501501| getThing | Registry.getThing(uid) | [ openHAB Thing] ( https://www.openhab.org/javadoc/latest/org/openhab/core/thing/thing ) |
502502| getChannel | Registry.getChannel(uid) | [ openHAB Channel] ( https://www.openhab.org/javadoc/latest/org/openhab/core/thing/channel ) |
503+ | getItems | Registry.getItems() | Array of [ Item] ( #class-item ) |
503504| getItemState | Registry.getItemState(item_name, default = None) | [ openHAB State] ( https://www.openhab.org/javadoc/latest/org/openhab/core/types/state ) |
504505| getItem | Registry.getItem(item_name) | [ Item] ( #class-item ) |
505506| resolveItem | Registry.resolveItem(item_or_item_name) | [ Item] ( #class-item ) |
Original file line number Diff line number Diff line change 1- __version__ = "1.0.12 " # version string is for backward compatibility with openhab 5.0.0
1+ __version__ = "1.0.13 " # version string is for backward compatibility with openhab 5.0.0
22
33from openhab .helper import rule , logger , Registry
Original file line number Diff line number Diff line change @@ -472,6 +472,10 @@ def getChannel(uid: str) -> Java_Channel:
472472 raise builtins .__wrapException__ (NotFoundException ("Channel {} not found" .format (uid )),2 )
473473 return channel
474474
475+ @staticmethod
476+ def getItems () -> list [Item ]:
477+ return scope .itemRegistry .getItems ()
478+
475479 @staticmethod
476480 @_Tracing .javacall
477481 def getItemState (item_name : str , default : Java_PrimitiveType = None ) -> Java_PrimitiveType :
You can’t perform that action at this time.
0 commit comments