I have an old installation of Home Assistant that I have cobbled together over the past few years. I have not updated it because I see no need when it is working fine, and there’s only so many things one can do in a day. The whole point of a smart home is to make your life easier, right?
Anyway, I decided to get a fresh start with new hardware and the latest code. I’ve been copying my YAML over to the new machine, and it’s all been going pretty well. That is, until I got to the SQL sensors.
Best I can tell, the schema - nay, the entire concept - has changed. I used to be able to create sensors using simple SELECTs and WHERE clauses. Best I can tell, now it’s impossible to pull any information out of the database without a bunch of INNER JOINs and/or LEFT JOINs and/or subselects. I used to be pretty good at writing SQL but it’s been years and that area of my brain is full of cobwebs now.
Is this true, or am I missing something? I really don’t see any advantage to the new schema over the old one. Am I just looking at it wrong?