Use select statment to show if db exits instead of
'SHOW DATABASES' which cant be run by a non admin user.
See https://github.com/influxdata/influxdb/issues/4785 for more info.
Also influxdb dont like empty writes('') so ignore state changes of that kind,
this happens on startup of home assistant.
Signed-off-by: Robert Marklund <robbelibobban@gmail.com>