You are referring to both Actual energy consumption [4.0.0.0;4.9.9.9] and Historical energy consumption [4.0.0.0;4.9.9.9], correct?
I can install them without error.
Looking at the historical rule it looks reasonable.
I don’t have all these Items so I can’t create an instance of the rule that makes sense in my system right now (I do have an energy meter so stay tuned) but looking at the JS code in the template the only thing that stands out is that first line doesn’t actually do anything:
items.getItem('{{energyUseageDaily}}').postUpdate((items.getItem('{{energyCounter}}').history.deltaSince(time.ZonedDateTime.now().minusDays(1), '{{persistenceService}}')));
It pulls the deltaSince but doesn’t save it to a variable so it’s kind of a noop.
But the rest of the rule looks OK so it should be fine as written.
The actual energy rule might have a problem. The last line of the script action seems to have an unmatched closing }
. But it’s not entirely clear that’s really the case and how that happened at all using Blockly in the first place.
I see that you got it to work so that }
is a mystery.
Note that in OH 4 most of those blocks are now implemented by the base Blockly under the Dates and Times category. The blocks are implemented slightly differently but if you used those users of your templates wouldn’t need to install the separate library.