Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team

Question
Rogga10000 0
I have a meter whose value I display with a Label in a VD with following code: fibaro: call (fibaro: getSelfId (), "setProperty", "ui.Label1.value", fibaro: getValue (262, "energy") .. " kWh ");.
I am wondering if anyone can help me develop the LUA code with an additional Label and virtual button in VD.
I have the following idea for the function. When the button is pressed, in my case, "value 262" is copied to a local variable that can be called "old value". The new label shows the current value minus the "old value" i.e., my energy use since the last reset.
Also believe me to have read somewhere that Fibaro has a command that shows the timestamp of an event which in my case could show when "old value" was last saved
Does anyone have a solution to this challenge?
Edited by Rogga10000Clarification of my question
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.