mirror of https://github.com/home-assistant/core
Clean up speedtest (#41139)
* Remove unused error string + add server list log msg * Use more common reference texts * Revert translation files + correct typos
This commit is contained in:
parent
f787289ea0
commit
59edb25e4e
|
@ -1,2 +1,2 @@
|
|||
speedtest:
|
||||
description: Immediately take a speedest with Fast.com
|
||||
description: Immediately execute a speed test with Fast.com
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
speedtest:
|
||||
description: Immediately take a speedest with iperf3
|
||||
description: Immediately execute a speed test with iperf3
|
||||
fields:
|
||||
host:
|
||||
description: The host name of the iperf3 server (already configured) to run a test with.
|
||||
|
|
|
@ -60,7 +60,6 @@ def server_id_valid(server_id):
|
|||
|
||||
async def async_setup(hass, config):
|
||||
"""Import integration from config."""
|
||||
|
||||
if DOMAIN in config:
|
||||
hass.async_create_task(
|
||||
hass.config_entries.flow.async_init(
|
||||
|
@ -139,6 +138,7 @@ class SpeedTestDataCoordinator(DataUpdateCoordinator):
|
|||
try:
|
||||
server_list = self.api.get_servers()
|
||||
except speedtest.ConfigRetrievalError:
|
||||
_LOGGER.debug("Error retrieving server list")
|
||||
return
|
||||
|
||||
self.servers[DEFAULT_SERVER] = {}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Config flow for Speedtest.net."""
|
||||
import logging
|
||||
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant import config_entries
|
||||
|
@ -18,8 +16,6 @@ from .const import (
|
|||
)
|
||||
from .const import DOMAIN # pylint: disable=unused-import
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class SpeedTestFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
"""Handle Speedtest.net config flow."""
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
"""Support for Speedtest.net internet speed testing sensor."""
|
||||
import logging
|
||||
|
||||
from homeassistant.const import ATTR_ATTRIBUTION
|
||||
from homeassistant.core import callback
|
||||
from homeassistant.helpers.restore_state import RestoreEntity
|
||||
|
@ -19,8 +17,6 @@ from .const import (
|
|||
SENSOR_TYPES,
|
||||
)
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up the Speedtestdotnet sensors."""
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
speedtest:
|
||||
description: Immediately take a speedest with Speedtest.net
|
||||
description: Immediately execute a speed test with Speedtest.net
|
||||
|
|
|
@ -2,13 +2,12 @@
|
|||
"config": {
|
||||
"step": {
|
||||
"user": {
|
||||
"title": "Set up SpeedTest",
|
||||
"description": "Are you sure you want to set up SpeedTest?"
|
||||
"description": "[%key:common::config_flow::description::confirm_setup%]"
|
||||
}
|
||||
},
|
||||
"abort": {
|
||||
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
|
||||
"wrong_server_id": "Server id is not valid"
|
||||
"wrong_server_id": "Server ID is not valid"
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
|
@ -20,9 +19,6 @@
|
|||
"server_name": "Select test server"
|
||||
}
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"retrive_error": "Error retriving servers list"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,21 +1,16 @@
|
|||
{
|
||||
"config": {
|
||||
"abort": {
|
||||
"one_instance_allowed": "Only a single instance is necessary.",
|
||||
"single_instance_allowed": "Already configured. Only a single configuration possible.",
|
||||
"wrong_server_id": "Server id is not valid"
|
||||
"single_instance_allowed": "[%key:common::config_flow::abort::single_instance_allowed%]",
|
||||
"wrong_server_id": "Server ID is not valid"
|
||||
},
|
||||
"step": {
|
||||
"user": {
|
||||
"description": "Are you sure you want to set up SpeedTest?",
|
||||
"title": "Set up SpeedTest"
|
||||
"description": "[%key:common::config_flow::description::confirm_setup%]"
|
||||
}
|
||||
}
|
||||
},
|
||||
"options": {
|
||||
"error": {
|
||||
"retrive_error": "Error retriving servers list"
|
||||
},
|
||||
"step": {
|
||||
"init": {
|
||||
"data": {
|
||||
|
|
Loading…
Reference in New Issue