Solcast and Home Assistant

I use the Solcast custom component to request the history and the forecast. It isn’t the greatest – definitely room for improvement – but it works. Getting the rest of the day’s forecast is basically what I need.

In terms of sending the data back, I submit every 5 mins during daylight, as long as I know I’m getting max PV use. In my case, this is if I am in Bulk mode and the batteries are not yet charged – I know my batteries pull most of the current from the panels. Once I reach absorb or float I stop pushing updates, because I don’t want to “train” Solcast that I have less PV than what they predict. This is why my “actuals” on Solcast falls mid-day.

I have a sensor which averages the PV yield over the last 5 minutes:

##5 minute average for production
  - platform: statistics
    entity_id: sensor.victron_pv_power
    name: pv_stats
    max_age:
      minutes: 5

Then I have this automation which actually submits (i.e. calls the service created by the restful component):

- alias: solcast-upload
  trigger:
    platform: time_pattern
    minutes: /5
  condition:
    condition: and
    conditions:
    - condition: sun
      before: sunset
      before_offset: +00:30:00
    - condition: sun
      after: sunrise
      after_offset: -00:30:00
    - condition: state
      entity_id: switch.force_charge
      state: 'off'
    - condition: state
      entity_id: sensor.victron_inverter_state
      state: Bulk
      for:
        minutes: 5
  action:
    service: rest_command.solcast_tune
2 Likes