mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
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:
parent
5e3555022f
commit
de628602c2
@ -40,15 +40,18 @@ def _has_all_unique_bilds(value):
|
|||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
DEVICE_SCHEMA = vol.Schema(
|
DEVICE_SCHEMA = vol.All(
|
||||||
{
|
cv.deprecated(CONF_CERT),
|
||||||
vol.Required(CONF_HOST): str,
|
vol.Schema(
|
||||||
vol.Required(CONF_BLID): str,
|
{
|
||||||
vol.Required(CONF_PASSWORD): str,
|
vol.Required(CONF_HOST): str,
|
||||||
vol.Optional(CONF_CERT, default=DEFAULT_CERT): str,
|
vol.Required(CONF_BLID): str,
|
||||||
vol.Optional(CONF_CONTINUOUS, default=DEFAULT_CONTINUOUS): bool,
|
vol.Required(CONF_PASSWORD): str,
|
||||||
vol.Optional(CONF_DELAY, default=DEFAULT_DELAY): int,
|
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],
|
address=config_entry.data[CONF_HOST],
|
||||||
blid=config_entry.data[CONF_BLID],
|
blid=config_entry.data[CONF_BLID],
|
||||||
password=config_entry.data[CONF_PASSWORD],
|
password=config_entry.data[CONF_PASSWORD],
|
||||||
cert_name=config_entry.data[CONF_CERT],
|
|
||||||
continuous=config_entry.options[CONF_CONTINUOUS],
|
continuous=config_entry.options[CONF_CONTINUOUS],
|
||||||
delay=config_entry.options[CONF_DELAY],
|
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 . import CannotConnect, async_connect_or_timeout, async_disconnect_or_timeout
|
||||||
from .const import (
|
from .const import (
|
||||||
CONF_BLID,
|
CONF_BLID,
|
||||||
CONF_CERT,
|
|
||||||
CONF_CONTINUOUS,
|
CONF_CONTINUOUS,
|
||||||
CONF_DELAY,
|
CONF_DELAY,
|
||||||
CONF_NAME,
|
CONF_NAME,
|
||||||
DEFAULT_CERT,
|
|
||||||
DEFAULT_CONTINUOUS,
|
DEFAULT_CONTINUOUS,
|
||||||
DEFAULT_DELAY,
|
DEFAULT_DELAY,
|
||||||
ROOMBA_SESSION,
|
ROOMBA_SESSION,
|
||||||
@ -27,7 +25,6 @@ DATA_SCHEMA = vol.Schema(
|
|||||||
vol.Required(CONF_HOST): str,
|
vol.Required(CONF_HOST): str,
|
||||||
vol.Required(CONF_BLID): str,
|
vol.Required(CONF_BLID): str,
|
||||||
vol.Required(CONF_PASSWORD): 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_CONTINUOUS, default=DEFAULT_CONTINUOUS): bool,
|
||||||
vol.Optional(CONF_DELAY, default=DEFAULT_DELAY): int,
|
vol.Optional(CONF_DELAY, default=DEFAULT_DELAY): int,
|
||||||
}
|
}
|
||||||
@ -45,7 +42,6 @@ async def validate_input(hass: core.HomeAssistant, data):
|
|||||||
address=data[CONF_HOST],
|
address=data[CONF_HOST],
|
||||||
blid=data[CONF_BLID],
|
blid=data[CONF_BLID],
|
||||||
password=data[CONF_PASSWORD],
|
password=data[CONF_PASSWORD],
|
||||||
cert_name=data[CONF_CERT],
|
|
||||||
continuous=data[CONF_CONTINUOUS],
|
continuous=data[CONF_CONTINUOUS],
|
||||||
delay=data[CONF_DELAY],
|
delay=data[CONF_DELAY],
|
||||||
)
|
)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"name": "iRobot Roomba",
|
"name": "iRobot Roomba",
|
||||||
"config_flow": true,
|
"config_flow": true,
|
||||||
"documentation": "https://www.home-assistant.io/integrations/roomba",
|
"documentation": "https://www.home-assistant.io/integrations/roomba",
|
||||||
"requirements": ["roombapy==1.5.2"],
|
"requirements": ["roombapy==1.5.3"],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": ["@pschmitt", "@cyr-ius", "@shenxn"]
|
"codeowners": ["@pschmitt", "@cyr-ius", "@shenxn"]
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@
|
|||||||
"host": "Hostname or IP Address",
|
"host": "Hostname or IP Address",
|
||||||
"blid": "BLID",
|
"blid": "BLID",
|
||||||
"password": "Password",
|
"password": "Password",
|
||||||
"certificate": "Certificate",
|
|
||||||
"continuous": "Continuous",
|
"continuous": "Continuous",
|
||||||
"delay": "Delay"
|
"delay": "Delay"
|
||||||
}
|
}
|
||||||
|
@ -1840,7 +1840,7 @@ rocketchat-API==0.6.1
|
|||||||
roku==4.1.0
|
roku==4.1.0
|
||||||
|
|
||||||
# homeassistant.components.roomba
|
# homeassistant.components.roomba
|
||||||
roombapy==1.5.2
|
roombapy==1.5.3
|
||||||
|
|
||||||
# homeassistant.components.rova
|
# homeassistant.components.rova
|
||||||
rova==0.1.0
|
rova==0.1.0
|
||||||
|
@ -719,7 +719,7 @@ ring_doorbell==0.6.0
|
|||||||
roku==4.1.0
|
roku==4.1.0
|
||||||
|
|
||||||
# homeassistant.components.roomba
|
# homeassistant.components.roomba
|
||||||
roombapy==1.5.2
|
roombapy==1.5.3
|
||||||
|
|
||||||
# homeassistant.components.yamaha
|
# homeassistant.components.yamaha
|
||||||
rxv==0.6.0
|
rxv==0.6.0
|
||||||
|
@ -4,7 +4,6 @@ from roomba import RoombaConnectionError
|
|||||||
from homeassistant import config_entries, data_entry_flow, setup
|
from homeassistant import config_entries, data_entry_flow, setup
|
||||||
from homeassistant.components.roomba.const import (
|
from homeassistant.components.roomba.const import (
|
||||||
CONF_BLID,
|
CONF_BLID,
|
||||||
CONF_CERT,
|
|
||||||
CONF_CONTINUOUS,
|
CONF_CONTINUOUS,
|
||||||
CONF_DELAY,
|
CONF_DELAY,
|
||||||
DOMAIN,
|
DOMAIN,
|
||||||
@ -20,7 +19,6 @@ VALID_YAML_CONFIG = {
|
|||||||
CONF_HOST: "1.2.3.4",
|
CONF_HOST: "1.2.3.4",
|
||||||
CONF_BLID: "blid",
|
CONF_BLID: "blid",
|
||||||
CONF_PASSWORD: "password",
|
CONF_PASSWORD: "password",
|
||||||
CONF_CERT: "/etc/ssl/certs/ca-certificates.crt",
|
|
||||||
CONF_CONTINUOUS: True,
|
CONF_CONTINUOUS: True,
|
||||||
CONF_DELAY: 1,
|
CONF_DELAY: 1,
|
||||||
}
|
}
|
||||||
@ -69,7 +67,6 @@ async def test_form(hass):
|
|||||||
assert result2["result"].unique_id == "blid"
|
assert result2["result"].unique_id == "blid"
|
||||||
assert result2["data"] == {
|
assert result2["data"] == {
|
||||||
CONF_BLID: "blid",
|
CONF_BLID: "blid",
|
||||||
CONF_CERT: "/etc/ssl/certs/ca-certificates.crt",
|
|
||||||
CONF_CONTINUOUS: True,
|
CONF_CONTINUOUS: True,
|
||||||
CONF_DELAY: 1,
|
CONF_DELAY: 1,
|
||||||
CONF_HOST: "1.2.3.4",
|
CONF_HOST: "1.2.3.4",
|
||||||
@ -131,7 +128,6 @@ async def test_form_import(hass):
|
|||||||
assert result["title"] == "imported_roomba"
|
assert result["title"] == "imported_roomba"
|
||||||
assert result["data"] == {
|
assert result["data"] == {
|
||||||
CONF_BLID: "blid",
|
CONF_BLID: "blid",
|
||||||
CONF_CERT: "/etc/ssl/certs/ca-certificates.crt",
|
|
||||||
CONF_CONTINUOUS: True,
|
CONF_CONTINUOUS: True,
|
||||||
CONF_DELAY: 1,
|
CONF_DELAY: 1,
|
||||||
CONF_HOST: "1.2.3.4",
|
CONF_HOST: "1.2.3.4",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user