Tried JSON with no avail…
So I’ve set up a File Sensor to read a file called bmv700.txt which displays results as so:
{‘FW’: ‘0308’, ‘SOC’: ‘968’, ‘Relay’: ‘OFF’, ‘PID’: ‘0x203’, ‘H10’: ‘0’, ‘BMV’: ‘700’, ‘TTG’: ‘-1’, ‘H12’: ‘0’, ‘H18’: ‘222’, ‘I’: ‘6524’, ‘H11’: ‘0’, ‘Alarm’: ‘OFF’, ‘CE’: ‘-5795’, ‘H17’: ‘152’, ‘P’: ‘88’, ‘AR’: ‘0’, ‘V’: ‘13533’, ‘H8’: ‘14148’, ‘H9’: ‘77533’, ‘H2’: ‘-61453’, ‘H3’: ‘-60260’, ‘H1’: ‘-61453’, ‘H6’: ‘-126081’, ‘H7’: ‘4’, ‘H4’: ‘2’, ‘H5’: ‘0’}
in configuration.yaml as part of the File Sensor config i’m using a template of:
- platform: file
name: BMV - SOC
file_path: /config/vedirect/bmv700.txt
value_template: >
{{ value.split(',')[1] }}
And getting exactly this in the front end:
‘SOC’: '968’
That is State of charge (batteries) at 96.8%.
I’d like to only display 96.8% and none of the letters or punctuation.
Any help greatly appreciated.