Remove certificate configuration variable from roomba (#35162)

* Remove certificate option from roomba

* Fix roomba test

* Add back certificate with deprecated flag

* Remove invalidation_version
This commit is contained in:
Xiaonan Shen authored and GitHub committed 2020-05-04 08:28:32 -04:00
1 parent 5e3555022f
commit de628602c2
7 files changed
+15 -22

No files matched your search

+12 -10
View File
@@ -40,15 +40,18 @@ def _has_all_unique_bilds(value):
return value
DEVICE_SCHEMA = vol.Schema(
{
vol.Required(CONF_HOST): str,
vol.Required(CONF_BLID): str,
vol.Required(CONF_PASSWORD): str,
vol.Optional(CONF_CERT, default=DEFAULT_CERT): str,
vol.Optional(CONF_CONTINUOUS, default=DEFAULT_CONTINUOUS): bool,
vol.Optional(CONF_DELAY, default=DEFAULT_DELAY): int,
},
DEVICE_SCHEMA = vol.All(
cv.deprecated(CONF_CERT),
vol.Schema(
{
vol.Required(CONF_HOST): str,
vol.Required(CONF_BLID): str,
vol.Required(CONF_PASSWORD): str,
vol.Optional(CONF_CERT, default=DEFAULT_CERT): str,
vol.Optional(CONF_CONTINUOUS, default=DEFAULT_CONTINUOUS): bool,
vol.Optional(CONF_DELAY, default=DEFAULT_DELAY): int,
},
),
)
@@ -92,7 +95,6 @@ async def async_setup_entry(hass, config_entry):
address=config_entry.data[CONF_HOST],
blid=config_entry.data[CONF_BLID],
password=config_entry.data[CONF_PASSWORD],
cert_name=config_entry.data[CONF_CERT],
continuous=config_entry.options[CONF_CONTINUOUS],
delay=config_entry.options[CONF_DELAY],
)
@@ -11,11 +11,9 @@ from homeassistant.core import callback
from . import CannotConnect, async_connect_or_timeout, async_disconnect_or_timeout
from .const import (
CONF_BLID,
CONF_CERT,
CONF_CONTINUOUS,
CONF_DELAY,
CONF_NAME,
DEFAULT_CERT,
DEFAULT_CONTINUOUS,
DEFAULT_DELAY,
ROOMBA_SESSION,
@@ -27,7 +25,6 @@ DATA_SCHEMA = vol.Schema(
vol.Required(CONF_HOST): str,
vol.Required(CONF_BLID): str,
vol.Required(CONF_PASSWORD): str,
vol.Optional(CONF_CERT, default=DEFAULT_CERT): str,
vol.Optional(CONF_CONTINUOUS, default=DEFAULT_CONTINUOUS): bool,
vol.Optional(CONF_DELAY, default=DEFAULT_DELAY): int,
}
@@ -45,7 +42,6 @@ async def validate_input(hass: core.HomeAssistant, data):
address=data[CONF_HOST],
blid=data[CONF_BLID],
password=data[CONF_PASSWORD],
cert_name=data[CONF_CERT],
continuous=data[CONF_CONTINUOUS],
delay=data[CONF_DELAY],
)
@@ -3,7 +3,7 @@
"name": "iRobot Roomba",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/roomba",
"requirements": ["roombapy==1.5.2"],
"requirements": ["roombapy==1.5.3"],
"dependencies": [],
"codeowners": ["@pschmitt", "@cyr-ius", "@shenxn"]
}
@@ -8,7 +8,6 @@
"host": "Hostname or IP Address",
"blid": "BLID",
"password": "Password",
"certificate": "Certificate",
"continuous": "Continuous",
"delay": "Delay"
}