mirror of
https://github.com/home-assistant/core.git
synced 2026-12-03 04:08:19 -04:00
Rename Foreca integration to Foreca Weather (#194588)
This commit is contained in:
@@ -77,7 +77,7 @@ class ForecaConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
)
|
||||
if not errors:
|
||||
return self.async_create_entry(
|
||||
title="Foreca",
|
||||
title="Foreca Weather",
|
||||
data={CONF_API_KEY: user_input[CONF_API_KEY]},
|
||||
subentries=[
|
||||
ConfigSubentryData(
|
||||
@@ -86,7 +86,7 @@ class ForecaConfigFlow(ConfigFlow, domain=DOMAIN):
|
||||
CONF_LONGITUDE: self.hass.config.longitude,
|
||||
},
|
||||
subentry_type=SUBENTRY_TYPE_LOCATION,
|
||||
title=(info.name if info else None) or "Foreca",
|
||||
title=(info.name if info else None) or "Foreca Weather",
|
||||
unique_id=(
|
||||
f"{self.hass.config.latitude}-"
|
||||
f"{self.hass.config.longitude}"
|
||||
@@ -183,7 +183,7 @@ class LocationSubentryFlowHandler(ConfigSubentryFlow):
|
||||
)
|
||||
if not errors:
|
||||
return self.async_create_entry(
|
||||
title=(info.name if info else None) or "Foreca",
|
||||
title=(info.name if info else None) or "Foreca Weather",
|
||||
data={CONF_LATITUDE: latitude, CONF_LONGITUDE: longitude},
|
||||
unique_id=unique,
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"domain": "foreca",
|
||||
"name": "Foreca",
|
||||
"name": "Foreca Weather",
|
||||
"categories": ["weather_alerts.forecasts"],
|
||||
"codeowners": ["@EetuPelkonen", "@hyvatti-foreca"],
|
||||
"config_flow": true,
|
||||
|
||||
@@ -4801,7 +4801,7 @@
|
||||
"iot_class": "cloud_polling"
|
||||
},
|
||||
"foreca": {
|
||||
"name": "Foreca",
|
||||
"name": "Foreca Weather",
|
||||
"integration_type": "service",
|
||||
"categories": [
|
||||
"weather_alerts.forecasts"
|
||||
|
||||
@@ -302,7 +302,7 @@ def mock_config_entry() -> MockConfigEntry:
|
||||
"""Return a mock config entry with one location subentry."""
|
||||
return MockConfigEntry(
|
||||
domain=DOMAIN,
|
||||
title="Foreca",
|
||||
title="Foreca Weather",
|
||||
entry_id="01JZ4Q1F0RECA0000000000000",
|
||||
data={CONF_API_KEY: "test-key"},
|
||||
subentries_data=[
|
||||
|
||||
@@ -44,7 +44,7 @@ async def test_full_flow(hass: HomeAssistant) -> None:
|
||||
result["flow_id"], USER_INPUT
|
||||
)
|
||||
assert result["type"] is FlowResultType.CREATE_ENTRY
|
||||
assert result["title"] == "Foreca"
|
||||
assert result["title"] == "Foreca Weather"
|
||||
assert result["data"] == {CONF_API_KEY: "test-key"}
|
||||
# A new entry starts with the Home Assistant home location, so setting the
|
||||
# integration up produces a weather entity without a second step.
|
||||
@@ -185,7 +185,7 @@ async def test_entry_title_falls_back_without_location_name(
|
||||
result["flow_id"], SECOND_LOCATION_INPUT
|
||||
)
|
||||
assert result["type"] is FlowResultType.CREATE_ENTRY
|
||||
assert result["title"] == "Foreca"
|
||||
assert result["title"] == "Foreca Weather"
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("mock_setup_entry", "mock_foreca_client")
|
||||
|
||||
Reference in New Issue
Block a user