Sensor as_timestamp render issue after upgrade to 2021.12

Hi
I have the following rest sensor which output ISO formatted time. Its been fine for months- - after 2021.12 i get a permanent error “sensor.green_bins_collection rendered invalid timestamp: Mon, Dec 13”

No matter how i reformat the timestamp - i cannot remove the error - can anyone point me in the right direct:

The sensor is here:

  - platform: rest
    name: Green Bins Collection
    resource: https://citizen.westberks.gov.uk/apiserver/ajaxlibrary
    method: POST
    scan_interval: 7260
    device_class: timestamp
    payload: '{ "jsonrpc" : "2.0" , "id" : "1321455517694427543" , "method" : "veolia.wasteservices.v1.getServicesByUPRN" , "params" : { "uprn" : "XXXXXXXXXXX" } }'
    value_template: "{{ as_timestamp(value_json.result.services[1].ServiceHeaders.ServiceHeader.Next) | timestamp_custom('%A, %B %d, %Y')  }}"    
    headers:
      Content-Type: application/json
      User-Agent: Home Assistant REST sensor
```

Fixed with:
‘’’

  • platform: rest
    name: Green Bins Collection
    resource: https://citizen.westberks.gov.uk/apiserver/ajaxlibrary
    method: POST
    scan_interval: 7260
    device_class: timestamp
    payload: ‘{ “jsonrpc” : “2.0” , “id” : “1321455517694427543” , “method” : “veolia.wasteservices.v1.getServicesByUPRN” , “params” : { “uprn” : “100081027906” } }’
    value_template: “{{ as_timestamp(value_json.result.services[1].ServiceHeaders.ServiceHeader.Next) | timestamp_custom(’%Y-%m-%dT%H:%M:%S%z’) }}”
    headers:
    Content-Type: application/json
    User-Agent: Home Assistant REST sensor

and then using a template sensor:

  • sensor:
    • name: “Green Bin”
      state: “{{ as_timestamp(states(‘sensor.green_bins_collection’)) | timestamp_custom(’%a %d %b’) }}”
      icon: “mdi:calendar-clock”
      ‘’’

Can you please elaborate on what the problem was?

it was the timestamp formatting changes that caused it to stop working