Rest Sensor for PV Produktion gets unavailable

I have an template sensor for my PV Produktion. The PV converter is integrated via WiFi dongle. Now my problem is, that this dongle switches to unavailable by sundown and my assistant gets errors in logs.

Next day by sunrise the sensor stays unavailable till I reload configuration.

Is there any way to configure the sensor for automatic reset or tell the hassos that this sensor just works from sunrise till sundown?

Here the config for the themplate_sensor.yaml

sensor:

  • name: KorteHomePV Produktion
    unique_id: solplanet_current_production
    state: “{{ state_attr(‘sensor.KorteHomePV’, ‘pac’) | float(0)}}”
    unit_of_measurement: ‘Wh’
    device_class: energy
    state_class: measurement
    icon: mdi:transmission-tower-export

  • name: KorteHomePV Tageswert
    unique_id: solplanet_daily_production
    state: “{{ state_attr(‘sensor.KorteHomePV’, ‘etd’) | float / 10 }}”
    unit_of_measurement: ‘kWh’
    device_class: energy
    state_class: total_increasing

And here the sensor itself

platform: rest
resource: http://xxx.xxx.xxx.xx:8484/getdevdata.cgi?device=2&sn=RG500060S22C0033
scan_interval: ‘00:00:10’
name: KorteHomePV
value_template: ‘OK’
json_attributes:

  • flg # ???
  • tim # date/time
  • tmp # inverter temperature / 10
  • fac # frequency / 100
  • pac # actual power watt
  • sac # apparent power
  • qac # reactive power
  • eto # total produced / 10
  • etd # total produced daily / 10
  • hto # running time
  • pf # ???
  • wan # ???
  • err # errors
  • vac # voltage / 10
  • iac # current / 10
  • vpv # string voltage
  • ipv # string current
  • str