I have had 3 sql sensors in my config for over a year. They all use the same query, I noticed recently in the past couple of days when an automation failed that my logs are full of Warnings that the queries have “returned no results”.
Logger: homeassistant.components.sql.sensor
Source: components/sql/sensor.py:209
Integration: SQL (documentation, issues)
First occurred: 21:09:18 (653 occurrences)
Last logged: 22:57:05
SELECT * FROM states WHERE entity_id = "input_boolean.person1_extended_away" AND state != "unknown" AND last_changed < DATE_SUB(now(), INTERVAL 1 DAY) ORDER BY state_id DESC LIMIT 1; returned no results
SELECT * FROM states WHERE entity_id = "input_boolean.person2_extended_away" AND state != "unknown" AND last_changed < DATE_SUB(now(), INTERVAL 1 DAY) ORDER BY state_id DESC LIMIT 1; returned no results
SELECT * FROM states WHERE entity_id = "sensor.openweathermap_forecast_temperature" AND state != "unknown" AND last_changed < DATE_SUB(now(), INTERVAL 1 DAY) ORDER BY state_id DESC LIMIT 1; returned no results
I literally haven’t touched these since I first set them up, apart from to move them out of YAML. So I’m not sure why they’ve suddenly stopped working.