use a variable from msg to dynamically set ui-group name in a (subflow's) dashboard node #1456
Labels
feature-request
New feature or request that needs to be turned into Epic/Story details
needs-triage
Needs looking at to decide what to do
Description
Thx for all the great work on Dashboard!
Would it be possible to have a msg part be the ui-group name of a dashboard node (on deployment)? I have used room names as an example below, but the general idea here is that often you will find that the arrangement of the subscribed topic tree is reflected in a dashboard. So then it would be very handy if (parts of) the topic tree 'automagically' perform ui-group 'placement' in a page.
Imagine a subflow that shows temperutures in a chart and gauge. The subflow is in a flow and is (only) connected to an mqtt_in node. The ui-group name is the room name where the temperatures are measured and the same room name is part of the subscribed topic that the mqtt_in node is subscribed to. The FR is to derive the room name from msg.topic and use that value as the ui-group name in the dashbaord node. That way you only need to create an mqtt_in node with the right topic and connect that to the subflow, to set the ui-group.
For example;
msg.topic.split("/")[1];
$[ROOM_NAME]
[page]/$[ROOM_NAME]
Prerequisite is of course to have the intended ui-group names defined in the dashboard environment beforehand otherwise this will lead to an undefined error or the like.
Have you provided an initial effort estimate for this issue?
I can not provide an initial effort estimate
The text was updated successfully, but these errors were encountered: