please let me add this extra post, since it is a separate but closely related to this thread https://community.home-assistant.io/t/solaredge-solar-panels-support/14340:
how can we declare these sensors using the api key and site id from the secrets file.
Currently this is in the sensor-definition :
- platform: rest
resource: https://monitoringapi.solaredge.com/site/MYSITEID/overview.json?api_key=MYAPIKEY
value_template: '{{ value_json.overview.lastDayData.energy | float / 1000 | round(1) }}'
name: 'SolarEdge Last Day'
unit_of_measurement: 'kWh'
scan_interval: 900
Obviously i need the MYSITEID and MYAPIKEY in the secrets file, but i don’t know the correct syntax for that yet.
Thanks,
Marius