Aggregate State in Rule (or Dashboard)

To simplify a dashboard, an admin may remove a large number of sensors and put them in a secondary board. The user must navigate to that board to see the status of its items. Currently, you can use triggers and flow in the rules engine to write a variable that indicates if all items are inactive or active and can display that state on the primary board via a variables tile. This involves two triggers and one flow per device. After a few devices, this becomes error-prone.



In the example show, there is a dashboard called lights, and a variable called $Lightstatus. If all lights are off, the variable is set to false (inactive). If any light is on, it is set to true (active).

User Stories

  1. As an end-user, I want to know the status of a second board by viewing a tile on the current board so I know if something needs my attention.
  2. As an admin, I want to set up a status tile without coding or rules engine, so that active/inactive status can be displayed to end-users.

Acceptance Criteria

  1. System-level function to assess the active/inactive status of any dashboard. If any tile is active, the dashboard is active. If all tiles are inactive, the dashboard is inactive.
  2. Configuration on the dashboard tile that enables showing the system level active/inactive status of the connected dashboard.

Probably better assign a tag to a group of the devices, or group them some other way and then in the rule engine support boolean operations on the group like and [true] or or [true] meaning all the devices in the group in a certain state (state can be any attribute) value can be configurable, then you can write simple aggregation rules with one-liners.