Hi, I made a similar post last year.
I have 2 sql sensors in my config and since my previous post they’ve been working fine.
They use the same query, I noticed recently that they are no longer working. My logs are full of warnings that the queries have “returned no results”.
This coincided with when I updated to Core 2023.2.
Logger: homeassistant.components.sql.sensor
Source: components/sql/sensor.py:240
Integration: SQL (documentation, issues)
First occurred: 20:34:05 (197 occurrences)
Last logged: 21:22:38
SELECT * FROM states WHERE entity_id = "input_boolean.person1_extended_away" AND state != "unknown" AND last_updated < 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_updated < DATE_SUB(now(), INTERVAL 1 DAY) ORDER BY state_id DESC LIMIT 1; returned no results