Max_G
(Max G)
December 25, 2018, 1:26am
1
Documentation shows examples with and without “Thing” preceding the definition.
Which one is correct?
In case of both, which one is preferred?
With: https://www.openhab.org/docs/configuration/things.html
Without: https://www.openhab.org/addons/bindings/systeminfo/ (and others)
Thanks
gitMiguel
(Miika Jukka)
December 25, 2018, 6:00am
2
Never tried without “Thing” at the beginning. But as docs indicate:
The syntax for .things files is defined as
follows (parts in <..> are required):
“Thing” is not between angle brackets so it should work without it. Why don’t you just try it?
IMHO, I would prefer always precede the definition with “Thing”.
1 Like
Max_G
(Max G)
December 25, 2018, 6:42am
3
I tried both, and both work… but given lots is in flux, I thought I better check.
However, given that items start with some identifier, things should start with Thing too
1 Like
gitMiguel
(Miika Jukka)
December 25, 2018, 6:51am
4
So the answer is no. Thing definition doesn’t need to be prefixed with “Thing”, but it’s preferred for clarity.