Add tests for influxdb and fix a bug
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.
This commit is contained in:
1 parent
abc039a3d0
commit
61e2da8827
3 files changed
+174
-2
No files matched your search
@@ -39,7 +39,9 @@ def setup(hass, config):
|
||||
|
||||
from influxdb import InfluxDBClient, exceptions
|
||||
|
||||
if not validate_config(config, {DOMAIN: ['host']}, _LOGGER):
|
||||
if not validate_config(config, {DOMAIN: ['host',
|
||||
CONF_USERNAME,
|
||||
CONF_PASSWORD]}, _LOGGER):
|
||||
return False
|
||||
|
||||
conf = config[DOMAIN]
|
||||
|
||||
Reference in new issue
Block a user