Last Condition resets itself upon LUA reload

I’ve been migrating my scenes over to PLEG functions and I’ve noticed that when I enter in multiple conditions, the last one to be entered always gets reset when I reload LUA. It will look all correct with my name and logic expressions before the reload. Then when it reloads, the blue banner at the top displays UNDEFINED. After a refetch of the data, the very last condition is c1 and the logic expression is undefined. It only appears to do this when I enter in multiple conditions. If I just put one in and then reload LUA it goes through just fine.

EDIT: Updated for exact wording, and including image of errors

I’ve been seeing this the last few days.

Long time between PLEG edits, so don’t know when it manifested.

I’ve gotten in the habit of creating an empty condition before I reload Lua. This is an extra step, but resolves the issue and saves my work properly.

Sounds like Vera is not saving state as part of a reload. It used to do hat.

I still have this problem every time I install the PLEG at one of my friends Vera setup I have this problem. I have tried different browsers without any changes.

The only thing that seems to help is to reload LUA after every new entered condition - before adding an action to the condition.

Do you have any suggestions about what to do after installing the PLEG. It seems that the problem disappears after a while (days/weeks).

As mentioned before, I just add in a dummy condition at the end. If I am adding any new conditions, I make sure that I add one more. I leave the default name c1 and then just put something that will be true in the condition. Generally one of my triggers. Reload LUA, wait, then remove the dummy condition and reload again. This issue only appears on one of my two PLEG instances and as you mentioned, not every time. However when it does occur, it appears to have saved it into Vera. If I go and update that NULL referenced entry with the same settings it is supposed to be, it will rename it to c_condition1. Adding that 1 at the end.

Best Home Automation shopping experience. Shop at getvera!

© 2021 Ezlo Innovation, All Rights Reserved. Terms of Use | Privacy Policy | Forum Rules