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!