Unable to prepare setup for platform 'rest.sensor'

I’m trying to use rest to update data on PWS Weather. The update occurs, but I’m not getting my sensors back and it’s throwing errors in the log. I’ve searched and can’t figure out what I’m doing wrong?

From Configuration.yaml

rest:
  resource_template: >
    {% set datetime = utcnow().timestamp() | timestamp_custom('%Y-%m-%d+%H:%M:%S', local=false) %}
    {% set temperature_f = states('sensor.back_yard_atlas_temperature') | float * 9 / 5 + 32 %}
    {% set pressure_inhg = (state_attr('weather.kmoofall130', 'pressure') | float - 7) / 33.86 %}
    {% set solarRadiation_WM2 = states('sensor.back_yard_atlas_brightness') | float * 0.0079 %}

    https://pwsupdate.pwsweather.com/api/v1/submitwx?ID=xxx&PASSWORD=xxx&dateutc={{datetime}}&winddir={{states('sensor.back_yard_atlas_wind_direction')}}&windspeedmph={{states('sensor.back_yard_atlas_wind_speed')}}&tempf={{temperature_f}}&rainin={{states('sensor.hourly_rain')}}&dailyrainin={{states('sensor.daily_rain')}}&monthrainin={{states('sensor.monthly_rain')}}&yearrainin={{states('sensor.yearly_rain')}}&baromin={{pressure_inhg}}&humidity={{states('sensor.back_yard_atlas_humidity')}}&solarradiation={{solarRadiation_WM2}}&UV={{states('sensor.back_yard_atlas_uv_index')}}&softwaretype=SkipnyipHAv1&action=updateraw

  scan_interval: 54864000
  sensor:
    - name: "PWS Error Message"
      value_template: "{{ value_json.error }}"
  binary_sensor:
    - name: "PWS Success"
      value_template: "{{ value_json.success }}"

The message in the log says:

Logger: homeassistant.setup
Source: setup.py:497
First occurred: 9:43:22 AM (100 occurrences)
Last logged: 9:51:32 AM

Unable to prepare setup for platform 'rest.sensor': Unable to set up component.
Unable to prepare setup for platform 'rest.binary_sensor': Unable to set up component.

Any help would be appreciated! Thanks!

What do you get if you paste the resource_template definition into Developer Tools / Template? Does it return a reasonable URL?

Hi skipnyip,
Did you set up the restful integration in HA and did you reload HA since it was set up? It looks like the integration is not there according to the error.

Sorry for the delayed response, I expected an email or something when I got a reply, but did not and then I forgot about this…

Yes, I get a valid URL back from the Developer Tools / Template.

Result
Result type: string
https://pwsupdate.pwsweather.com/api/v1/submitwx?ID=xxx&PASSWORD=xxx&dateutc=2024-10-14+16:50:33&winddir=353.0&windspeedmph=5.0&tempf=58.200008000000004&rainin=0&dailyrainin=0&monthrainin=0&yearrainin=42.770000&baromin=30.22681630242174&humidity=51.0&solarradiation=207.77&UV=4&softwaretype=SkipnyipHAv1&action=updateraw
This template updates at the start of each minute.

This template listens for the following state changed events:

Entity: sensor.back_yard_atlas_brightness
Entity: sensor.back_yard_atlas_humidity
Entity: sensor.back_yard_atlas_temperature
Entity: sensor.back_yard_atlas_uv_index
Entity: sensor.back_yard_atlas_wind_direction
Entity: sensor.back_yard_atlas_wind_speed
Entity: sensor.daily_rain
Entity: sensor.hourly_rain
Entity: sensor.monthly_rain
Entity: sensor.yearly_rain
Entity: weather.kmoofall130

Sorry for the delayed response, I expected an email or something when I got a reply, but did not and then I forgot about this…

I believe that’s what is being setup in Configuration.yaml? The data is getting posted to the URL as expected, but I don’t appear to be getting my error or success signals back (or if I am I don’t know how to view them as they don’t appear to show up in History when I look for “PWS Error Message”.