Complete the code to start recording data points for trend charts.
scada.start_trend_recording([1])The start_trend_recording function requires the sensor_id to know which sensor's data to record.
Complete the code to fetch historical data for a given time range.
history = scada.get_historical_data(sensor_id, [1])The get_historical_data function needs the start_time to know from when to fetch data.
Fix the error in the code to correctly plot the trend chart.
scada.plot_trend_chart(data, [1]='time', y_axis='value')
The correct parameter name is x_axis to specify the horizontal axis data.
Fill both blanks to filter historical data by sensor and time range.
filtered_data = scada.filter_data([1], [2])
To filter data, you need the sensor_id and the end_time to define the range.
Fill all three blanks to create a summary of trend data with conditions.
summary = { [3]['[1]']: [3]['[2]'] for [3] in data if [3]['[2]'] > threshold }The dictionary comprehension uses timestamp as key, value as value, and item as the loop variable.