* Add STATE_UNAVAILABLE to states that are ignored when writing to the
database. This will avoid a field type error for string if the field
already contains a different type, eg integer.
* Add test for ignored states for influxdb.
* Clean up influxdb tests.
This adds tests for the influxdb component. It also fixes a bug,
where username and password are required, but not gracefully
handled if they're missing from config.
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>