MiAutomations

Miautomations Solax Inverter integration - Home Assistant RESP API

Aug 5th, 2021 (edited)
222
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #MiAutomations
  2. # Substituir os 1111111111111111 pelo vosso token ID e pelo vosso numero de serie do inversor nas linhas abaixo
  3. # Para ter acesso ao token ID  https://www.solaxcloud.com/#/api
  4. # Para ter acesso ao numero de serie do vosso inversos https://www.solaxcloud.com/#/inverter
  5. sensor:
  6.   - platform: rest
  7.     resource: https://www.solaxcloud.com:9443/proxy/api/getRealtimeInfo.do?tokenId=111111111111111111111111=&sn=11111111111111111111
  8.     value_template: '{{ ( value_json.result.yieldtotal | round(0) ) }}'
  9.     name: "Solax total"
  10.     unit_of_measurement: "KWh"
  11.  
  12.   - platform: rest
  13.     resource: https://www.solaxcloud.com:9443/proxy/api/getRealtimeInfo.do?tokenId=111111111111111111111111=&sn=11111111111111111111
  14.     value_template: '{{ ( value_json.result.acpower | round(0) ) }}'
  15.     name: "Solax now"
  16.     unit_of_measurement: "W"
  17.  
  18.   - platform: rest
  19.     resource: https://www.solaxcloud.com:9443/proxy/api/getRealtimeInfo.do?tokenId=111111111111111111111111=&sn=11111111111111111111
  20.     value_template: '{{ value_json.result.yieldtoday }}'
  21.     name: "Solax today"
  22.     unit_of_measurement: "KWh"
  23.    
  24.   - platform: rest
  25.     resource: https://www.solaxcloud.com:9443/proxy/api/getRealtimeInfo.do?tokenId=111111111111111111111111=&sn=11111111111111111111
  26.     value_template: "{{ value_json.result.uploadTime }}"
  27.     name: "Solax upload time"
  28.    
  29.   - platform: rest
  30.     resource: https://www.solaxcloud.com:9443/proxy/api/getRealtimeInfo.do?tokenId=111111111111111111111111=&sn=11111111111111111111
  31.     value_template: >
  32.          {% if value_json.result.inverterStatus == '100' %}Wait
  33.           {% elif value_json.result.inverterStatus == '101' %}Check
  34.           {% elif value_json.result.inverterStatus == '102' %}Normal
  35.           {% elif value_json.result.inverterStatus == '103' %}Fault
  36.           {% elif value_json.result.inverterStatus == '104' %}Permanent Fault
  37.           {% elif value_json.result.inverterStatus == '105' %}Update
  38.           {% elif value_json.result.inverterStatus == '106' %}EPS Check
  39.           {% elif value_json.result.inverterStatus == '107' %}EPS
  40.           {% elif value_json.result.inverterStatus == '108' %}Self-test
  41.           {% elif value_json.result.inverterStatus == '109' %}Idle
  42.           {% elif value_json.result.inverterStatus == '110' %}Standby
  43.           {% elif value_json.result.inverterStatus == '111' %}Pv Wake Up Bat
  44.           {% elif value_json.result.inverterStatus == '112' %}Gen Check
  45.           {% elif value_json.result.inverterStatus == '113' %}Gen Run
  46.           {% else %}I dont know{% endif %}
  47.     name: "Solax status"
RAW Paste Data