jimtng

Results 212 comments of jimtng

OK, I think I now understand what @spacemanspiff2007 was alluding to, thanks to @mherwege's explanation. > Thinking out loud here: As mapDB is kind of a special case which is...

> These use cases are now currently supported. Any move of restoreOnStartup to core would need to handle these use cases too. How the Item's state is saved and which...

So what's the next step? > * Changing the `restoreOnStartup` logic to also restore `lastChange`, `lastUpdate` and `previousState` at startup is fairly easy to do. The method to change is...

how do we resolve the access to these methods vs the persistence methods with the same name within rulesDSL?

> 2\. Change the name of the existing persistence actions to `getLastPersistedState`, `getLastPersistedUpdate` and `getPreviousPersistedState`. I think I like this option too!

> a mechanism whereby the new values from these functions can be accessed in the UI They are available through the REST API and it is already a part of...

see https://github.com/openhab/openhab-webui/issues/3221#issuecomment-3155012762

Regarding the `CHANNEL_METER_LASTMIN1` i.e. `lastPower1` channel - it is confusing that in the README.md it says > | | lastPower1 | Number | yes | Energy consumption for a round...

You can obtain `automationManager` through `scriptExtension.get("automationManager")`. `scriptExtension` is [injected by default](https://github.com/openhab/openhab-core/blob/72753be8cc9af029c3e656a89b29064f4624c73f/bundles/org.openhab.core.automation.module.script/src/main/java/org/openhab/core/automation/module/script/internal/ScriptEngineManagerImpl.java#L129), without having to import _any_ presets.

fyi I achieved this by [generating the sitemap](https://community.openhab.org/t/basicui-sitemap-automatically-generate-light-controls-from-semantic-model/152715)