I use a Aeon Labs HEM to measure energy. I want to calculate average kwh per day, so want to set a global variable to display on a dashboard tile. I created the global variable, and since apparently attributes from devices cannot be used directly, I created two local variables in a rule: one for energy attribute from the hem device, another for number of days since reset. The action would be to set a global variable from total energy divided by number of days.
When I create actions, I am able to set the appropriate local variable to energy, and I can set the global variable to be displayed to a calculated value that should be the above ratio. It all works as expected except for one hiccup: the attribute for number of days, “energyDuration” does not show up in the list of attributes! The duration attribute is otherwise present, and I display it in a tile on the energy dashboard, but it’s not in the list of attributes for the device when I try to set the rule local variable prior to calculation.
Am I not understanding the variables setting, or is this a bug?