I have set of REST sensors which take data from the Admiralty api (tides data). An automation calls rest.reload
every morning and has worked flawlessly until 7th December. On the same day that I updated to core 2023.12.1 this stopped and these REST sensors do not update with the morning automation nor when I use developer tools REST entity reload. They do update when I restart Home Assistant. None of the sensors deriving from this resource update. I have other REST sensors which are working normally.
I can’t find any errors referring to this in the log. The API provider does not report any errors and it looks like the API requests are not made.
It is entirely possible the update to 12.1 is a red herring, but I did not make any other changes to the REST sensors around that time. I did however make a ****-up which made me restore from the backup made when installing 12.1. I have subsequently kept up-to-date and am currently on 2023.12.3.
Can anyone suggest what might be going on?
An excerpt from the REST sensors:
rest:
- resource: https://admiraltyapi.azure-api.net/uktidalapi/api/V1/Stations/0536/TidalEvents?duration=6
scan_interval: 86400
headers:
Ocp-Apim-Subscription-Key: 1234567890
sensor:
- name: "UKTide 1 type"
unique_id: "UKtide1type"
value_template: "{{ value_json[0]['EventType']|replace('Water','') }}"
- name: "tide1"
unique_id: "tide1"
value_template: "{{ as_datetime(value_json[0]['DateTime']+'+00:00') }}"
device_class: timestamp
icon: mdi:clock-time-twelve
- name: "tide1h"
unique_id: "tide1h"
value_template: "{{ value_json[0]['Height']|float(0) }}"
state_class: measurement
unit_of_measurement: m
icon: >
{% if states('sensor.uktide_1_type')=="High" %}
mdi:arrow-collapse-up
{% else %}
mdi:arrow-collapse-down
{% endif %}
etc (there are quite a few of these sensors).
The automation that updates this every morning is this:
alias: "Morning update "
description: Daily 1am update of tides & REST sensors
trigger:
- platform: time
at: "03:00:0"
condition: []
action:
- service: multiscrape.trigger_last_tides_scraper
data: {}
- service: rest.reload
data: {}
- service: multiscrape.trigger_moon_scraper
data: {}
- service: multiscrape.trigger_waves_scraper
data: {}
- service: multiscrape.trigger_met_inshore_scraper2
data: {}
mode: single