Closed florian-h05 closed 1 year ago
This hacky fix passes the getItem method via the ItemSemantics constructor.
Yeah, a little hacky ;-) but i get the alternative might be a larger refactoring, maybe keep a refactor it in mind if this comes up again ? I think its ok for now.
maybe keep a refactor it in mind if this comes up again ? I think its ok for now.
Yeah, if this comes up once again I'd refactor it into the items file, this is the only other solution.
Reported in the community, see https://community.openhab.org/t/itemsemantics/146294.
Fixes an issue where the
location
andequipment
properties were not available becausegetItem
failed. This happened becauseitems.js
was imported fromitem-semantics.js
anditems.js
importeditem-semantics.js
, which lead to a circular require and failed. This hacky fix passes thegetItem
method via theItemSemantics
constructor./cc @rkoshak