Here is my config.yaml I’m using it with a Sofar ME3000SP Battery Inverter. I followed the instruction from here to get the Token and Json list of variables, very easy to follow: Collect Inverter data from Solarman API
rest:
resource: https://api.solarmanpv.com/device/v1.0/currentData?appId=<Your_AppID_Here>&language=en&=
method: POST
scan_interval: 300 #Solarman only get data every 5 min.
headers:
Authorization: bearer <Your_Token_Here>
Content-Type: application/json
payload: '{ "deviceSn": "<Your_Device_Serial_Here>"}'
sensor:
- name : "Sofar Inverter Temprature"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "INV_T0"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: '°C'
- name : "Sofar Inverter Radiator Temp"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "T_RDT1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: '°C'
- name : "Sofar Total AC Output Power (Active)"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "APo_t1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'W'
- name : "Sofar Cumulative Production kWh"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "Et_ge0"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'kWh'
- name : "Sofar Daily Production kWh"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "Etdy_ge1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'kWh'
- name : "Sofar AC Voltage R/U/A"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "AV1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'V'
- name : "Sofar AC Current R/U/A"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "AC1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'A'
- name : "Sofar DC Input Power"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "DPi_t1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'W'
- name : "Sofar Battery Status"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "B_ST1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''
- name : "Sofar Battery Voltage"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "B_V1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'V'
- name : "Sofar Battery Current"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "B_C1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'A'
- name : "Sofar Battery Power"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "B_P1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: 'W'
- name : "Sofar Battery SoC"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "B_left_cap1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: '%'
- name : "Sofar Inverter Status"
value_template: >
{%- for dict_item in value_json.dataList -%}
{%- if dict_item.key == "INV_ST1"-%}
{{dict_item.value}}
{%- endif -%}
{%- endfor -%}
unit_of_measurement: ''