I’m trying to set up a sensor to extract data from PVoutput which isn’t returned by the built in component.
I’ve been messing with a Rest sensor but cant import the data in a useable format. The raw data returned by the Get request is as comma separated values. Example :
If I set the value_template to value_json, the sensor state is unknown and no json is added to the sensor attributes.
If I set the value_template to value, the sensor STATE becomes the string of CSV, and I’m still unsure of how to parse it.
I’m particularly after the last two values.
{% set value = '3217521,2827732,35357,8479,51668,4.677,91,20180822,20181120,6.834,20181108,1674386,111904,1056049,118644,0,18399,7201,41663,363.68,437.60' %}
{{ value.split(',')[-1] }}
This is awesome. Was just working out how to get some more values from PVOutput as my system doesn’t have them. I was doing ok until I got the result and found out that the rest sensor didn’t like it too much.