Would any of you kind folk be able to guide me in what I need to do to fix this, I tried changing the entry in the sensor.yaml to start with
sql:
When I check the config I get an error on that line, I am not quite sure what I need to change.
Go to Settings → Devices & Services → SQL Integration and check if your SQL sensor has already been imported.
If it has then you can delete the commented out sensor YAML. Nothing else to do.
If it has not then use the + Add Integration button to add an SQL sensor via the UI, copying the things like the DB, query and name (exactly) from your commented out yaml. Once the sensor is created and confirmed working you can delete the commented out YAML.
Thanks Tom that worked. I already had the SQL Integration with a database size sensor. Once I commented out the lines in the sensor.yaml and restarted HA the warning went away. I will leave things as they are and check back in the morning to make sure events are being recorded and the database size reflects this and if all is good I will delete the lines I commented out.