This is a bit of a seasonal issue but I’d like to stop the warning being logged if possible.
I collect scheduled bin collection information for my address from my local council website using a set of rest sensors.
rest:
- authentication: basic
scan_interval: 604800
resource: !secret bincollectionuri
method: GET
timeout: 30
sensor:
- name: "Black Bin Collection"
json_attributes_path: "$.BinCollections.[?(@.JobStatus=='Scheduled' && @.BinType=='Black bin')]"
value_template: "OK"
json_attributes:
- JobStatus
- BinType
- JobScheduledStart
- name: "Green Bin Collection"
json_attributes_path: "$.BinCollections.[?(@.JobStatus=='Scheduled' && @.BinType=='Green bin')]"
value_template: "OK"
json_attributes:
- JobStatus
- BinType
- JobScheduledStart
- name: "Orange Bin Collection"
json_attributes_path: "$.BinCollections.[?(@.JobStatus=='Scheduled' && @.BinType=='Orange bin')]"
value_template: "OK"
json_attributes:
- JobStatus
- BinType
- JobScheduledStart
For a couple of months over the Xmas period garden waste collections (green bin) are suspended, meaning that the Green Bin Collection sensor has no results when updated and logs:
Logger: homeassistant.components.rest.sensor
Source: components/rest/sensor.py:170
Integration: RESTful (documentation, issues)
First occurred: 11:16:48 (1 occurrences)
Last logged: 11:16:48
JSON result was not a dictionary or list with 0th element a dictionary
Is there a way I can adjust my sensor to handle this valid scenario without logging the warning?