I installed core 2025.1.3 today and all my REST sensors have disappeared. I hastily restored from the overnight backup but they are all still missing. If I go to the entities list & filter by integration, REST is missing from the dropdown implying that it hasn’t loaded. I have tried restarting several times including a power off/on cycle. I have tried reloading the YAML by section (ie just the template entities or just the REST entities). This is the only reference to REST in the log:
Logger: homeassistant.setup
Source: setup.py:497
First occurred: 15:53:08 (129 occurrences)
Last logged: 15:53:08
Unable to prepare setup for platform 'rest.sensor': Unable to set up component.
I have checked that the API’s I’m going to with my REST sensor are working by using CURL in the terminal window. I have tested the REST sensors YAML work in the developer tools template tester. I don’t know what else to do. I feel aggrieved that everything worked perfectly well until I tried to install the update and that restore didn’t reverse whatever error the update caused!
Please HELP!
You mean home-assistant.log? In there I’m clearly getting a ton of errors due to all the REST entities being unavailable, but the messages relating to the integration look like this (many of)
2025-01-21 16:58:29.611 DEBUG (MainThread) [homeassistant.components.rest] Finished fetching rest data data in 1.498 seconds (success: True)
and a zillion copies of this
2025-01-21 16:58:30.422 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform 'rest.sensor': Unable to set up component.
I’ve spent hours on this and can’t find any errors that aren’t a result of a REST entity being unavailable, so how can I see what comes first?
My configuration is large and includes a lot of rest sensors from quite a few different resources. I’m not quite sure which to share without inundating you! The thing is I haven’t changed anything today - it all went bad when I did the core update.
e.g. The most recent code (being worked on yesterday but working fine when I finished) is this:
Just your logs, somewhere in your log file is likely a log line explaining why it cannot set up the rest integration. Either through a traceback or hand-tailored error.
Thanks. The log file is huge so I won’t send it. I’ll go through it more thoroughly looking for what you describe. Can I get back to you on this thread tomorrow when I’ve done this?
I’m very grateful for your help!
Thanks for the guidance. The problem was in how two of the REST resource templates were formed. They both uses an input_datetime and strftime to form the resource and it appears that during a restart this is not resolved before the REST is called and for some reason if the resource_template fails it causes ALL the REST sensors to fail. The reason this didn’t some to light during development was that I had been testing by reloading the YAML rather than restarting.
My solution is to use a trigger sensor which retains its value during a restart. So I’ve replaced this:-