Following updating my instance to the latest 2023.01.1 I have lost my Solax feed and I have the same error appearing hundreds of times in my log as follows;
Logger: homeassistant.components.rest.sensor
Source: components/rest/sensor.py:161
Integration: RESTful (documentation, issues)
First occurred: 11:04:16 (549 occurrences)
Last logged: 20:11:39
JSON result was not a dictionary or list with 0th element a dictionary
I have made no changes to my config but I have no feed from the Solax as a result (Using Cloud not local).
My Config is as follows (Its messy I am tidying it up slowly).
- platform: rest
scan_interval: 60
resource: https://www.solaxcloud.com/proxyApp/proxy/api/getRealtimeInfo.do?tokenId=nnnnnnnnnnnnnnnnnnnnnnnn&sn=ssssssssssssss
name: "Solax PV"
json_attributes_path: "$.result"
json_attributes:
- inverterSN # Inverter SN
- sn #
- acpower # Current Inverter Power Flows
- yieldtoday # Todays Total Generation (kWh)
- yieldtotal # Total Lifetime Generation (kWh)
- feedinpower # Current Export Generation (w)
- feedinenergy # Total Lifetime Exporta
- consumeenergy # Total Import from Grid (kWh)
- feedinpowerM2 #
- soc # Battery Percentage
- peps1 # PV Array 1
- peps2 # Null
- peps3 # Null
- powerdc1 # PV Array 1 Real Time Generation (Back)
- powerdc2 # PV Array 2 Real Time Generation (Side)
- batPower # Current Pull from - / to + Battery
- inverterType # Type 15 - Unknown
- inverterStatus # Status Indicator - 102/Normal
- uploadTime # Time of Data GET
value_template: "1" # Dummy Value, not used, avoids the "State max length is 255 characters" error
- platform: template
sensors:
solar_ac:
friendly_name: "Solar Inverter"
value_template: "{{ state_attr('sensor.solax_pv', 'acpower') }}"
unit_of_measurement: "w"
solar_today:
friendly_name: "Solar Daily Generation"
value_template: "{{ state_attr('sensor.solax_pv', 'yieldtoday') }}"
unit_of_measurement: "kWh"
solar_total:
friendly_name: "Solar Total Generation"
value_template: "{{ state_attr('sensor.solax_pv', 'yieldtotal') }}"
unit_of_measurement: "kWh"
solar_feedintotal:
friendly_name: "Solar Lifetime FeedIn"
value_template: "{{ state_attr('sensor.solax_pv', 'feedinenergy') }}"
unit_of_measurement: "w"
solar_battery:
friendly_name: "Solar Battery Status"
value_template: "{{ state_attr('sensor.solax_pv', 'soc') }}"
unit_of_measurement: "%"
solar_array1:
friendly_name: "Solar Rear Array"
value_template: "{{ state_attr('sensor.solax_pv', 'powerdc1') }}"
unit_of_measurement: "W"
solar_array2:
friendly_name: "Solar Side Array"
value_template: "{{ state_attr('sensor.solax_pv', 'powerdc2') }}"
unit_of_measurement: "W"
solar_batteryflow:
friendly_name: "Solar Battery Flow"
value_template: "{{ state_attr('sensor.solax_pv', 'batPower') }}"
unit_of_measurement: "W"
solar_gridin:
friendly_name: "Solar Feed In"
value_template: >
{% if (states('sensor.solar_feedin') | float (0) ) < 0 %}
{{ (states('sensor.solar_feedin') | float (0) | abs) }}
{% else %}
0
{% endif %}
unit_of_measurement: "W"
solar_gridout:
friendly_name: "Solar Feed Out"
value_template: >
{% if (states('sensor.solar_feedin') | float (0) ) > 0 %}
{{ (states('sensor.solar_feedin') | float (0) | abs) }}
{% else %}
0
{% endif %}
unit_of_measurement: "W"
solar_battery_out:
friendly_name: "Battery Out"
unit_of_measurement: "kWh"
value_template: >
{% if (states('sensor.solar_batteryflow') | float (0) ) < 0 %}
{{ (states('sensor.solar_batteryflow') | float (0) | abs) }}
{% else %}
0
{% endif %}
solar_battery_in:
friendly_name: "Battery In"
unit_of_measurement: "W"
value_template: >
{% if (states('sensor.solar_batteryflow') | float (0) ) > 0 %}
{{ (states('sensor.solar_batteryflow') | float (0) | abs) }}
{% else %}
0
{% endif %}
#solar_houseload:
# friendly_name: "House Load"
# value_template: >
# {% if (states('sensor.solar_ac') | float ) == 0 %}
# {{ (states('sensor.solar_ac') | float)
# + (states('sensor.grid_in') | float) - (states('sensor.grid_out') | float) }}
# {% else %}
# {{ (states('sensor.solar_ac') | float) lol
# + (states('sensor.grid_in') | float) - (states('sensor.grid_out') | float) }}
# {% endif %}
# unit_of_measurement: "W"
solar_generation:
friendly_name: "Solar Generation"
value_template: >
{{ states('sensor.solar_array1') | float (0) + states('sensor.solar_array2') | float (0) }}
unit_of_measurement: "W"
# Platform Integrations - Need to confirm these needed?
- platform: integration
source: sensor.solar_generation
name: Total_Generation
unit_prefix: k
method: left
- platform: integration
source: sensor.solar_gridin
name: total_grid_in
unit_prefix: k
#round: 2
#method: left
- platform: integration
source: sensor.solar_gridout
name: total_grid_out
unit_prefix: k
#round: 2
#method: left
- platform: integration
source: sensor.solar_battery_in
name: total_battery_in
unit_prefix: k
#round: 2
#method: left
- platform: integration
source: sensor.solar_battery_out
name: total_battery_out
unit_prefix: k
#round: 2
#method: left
- platform: integration
source: sensor.solar_houseload
name: total_house_load
unit_prefix: k
round: 2
#method: left
- platform: integration
source: sensor.solar_generation
name: total_solar
unit_prefix: k
#round: 2
#method: left
- platform: integration
source: sensor.solax_consumpton
name: total_consumption
unit_prefix: k
round: 0
#method: left
Any idea what is happening and how to fix, it seems very strange its just stopped working?