'Use " subscribe for time series " to set initial value of Thingsboard RPC control switch widget

Can someone direct me to the correct format for using a time series to set the initial state of an RPC control widget?

I am using the round switch widget on a thingsboard dashboard, and would like to set the initial value using the "subscribe for time series" method. I am using a valid telemetry metric for my device: data_RO1_status, in the Attribute/Timeseries value key field. I am not getting any data back in the Parse value function field, though, and the switch always just turns to off when the dashboard is reloaded. I can correctly display the value of the latest telemetry for this metric with a read-only gauge, so the issue must be with my understanding of the syntax. Can someone direct me to the correct format for using a time series to set the initial state of an RPC control widget?

Screenshot of my current settings



Solution 1:[1]

in the Advance tab you can check the initial value of the widget in the desired widget. In this case, each time the dashboard is loaded, the last value applied in the Latest telemetry database is applied to the desired widget.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ali Moayyed