mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 13:47:35 +00:00
Custom component -> Custom integration (#75404)
This commit is contained in:
parent
3144d179e0
commit
7adb0f0ef5
@ -152,7 +152,7 @@ class NumberEntityDescription(EntityDescription):
|
|||||||
else:
|
else:
|
||||||
module = inspect.getmodule(self)
|
module = inspect.getmodule(self)
|
||||||
if module and module.__file__ and "custom_components" in module.__file__:
|
if module and module.__file__ and "custom_components" in module.__file__:
|
||||||
report_issue = "report it to the custom component author."
|
report_issue = "report it to the custom integration author."
|
||||||
else:
|
else:
|
||||||
report_issue = (
|
report_issue = (
|
||||||
"create a bug report at "
|
"create a bug report at "
|
||||||
@ -222,7 +222,7 @@ class NumberEntity(Entity):
|
|||||||
):
|
):
|
||||||
module = inspect.getmodule(cls)
|
module = inspect.getmodule(cls)
|
||||||
if module and module.__file__ and "custom_components" in module.__file__:
|
if module and module.__file__ and "custom_components" in module.__file__:
|
||||||
report_issue = "report it to the custom component author."
|
report_issue = "report it to the custom integration author."
|
||||||
else:
|
else:
|
||||||
report_issue = (
|
report_issue = (
|
||||||
"create a bug report at "
|
"create a bug report at "
|
||||||
|
@ -275,7 +275,7 @@ def _suggest_report_issue(hass: HomeAssistant, entity_id: str) -> str:
|
|||||||
custom_component = entity_sources(hass).get(entity_id, {}).get("custom_component")
|
custom_component = entity_sources(hass).get(entity_id, {}).get("custom_component")
|
||||||
report_issue = ""
|
report_issue = ""
|
||||||
if custom_component:
|
if custom_component:
|
||||||
report_issue = "report it to the custom component author."
|
report_issue = "report it to the custom integration author."
|
||||||
else:
|
else:
|
||||||
report_issue = (
|
report_issue = (
|
||||||
"create a bug report at "
|
"create a bug report at "
|
||||||
|
@ -299,7 +299,7 @@ class WeatherEntity(Entity):
|
|||||||
and module.__file__
|
and module.__file__
|
||||||
and "custom_components" in module.__file__
|
and "custom_components" in module.__file__
|
||||||
):
|
):
|
||||||
report_issue = "report it to the custom component author."
|
report_issue = "report it to the custom integration author."
|
||||||
else:
|
else:
|
||||||
report_issue = (
|
report_issue = (
|
||||||
"create a bug report at "
|
"create a bug report at "
|
||||||
|
@ -936,7 +936,7 @@ class Entity(ABC):
|
|||||||
"""Suggest to report an issue."""
|
"""Suggest to report an issue."""
|
||||||
report_issue = ""
|
report_issue = ""
|
||||||
if "custom_components" in type(self).__module__:
|
if "custom_components" in type(self).__module__:
|
||||||
report_issue = "report it to the custom component author."
|
report_issue = "report it to the custom integration author."
|
||||||
else:
|
else:
|
||||||
report_issue = (
|
report_issue = (
|
||||||
"create a bug report at "
|
"create a bug report at "
|
||||||
|
@ -96,7 +96,7 @@ def report_integration(
|
|||||||
|
|
||||||
index = found_frame.filename.index(path)
|
index = found_frame.filename.index(path)
|
||||||
if path == "custom_components/":
|
if path == "custom_components/":
|
||||||
extra = " to the custom component author"
|
extra = " to the custom integration author"
|
||||||
else:
|
else:
|
||||||
extra = ""
|
extra = ""
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ def check_loop(
|
|||||||
integration = found_frame.filename[start:end]
|
integration = found_frame.filename[start:end]
|
||||||
|
|
||||||
if path == "custom_components/":
|
if path == "custom_components/":
|
||||||
extra = " to the custom component author"
|
extra = " to the custom integration author"
|
||||||
else:
|
else:
|
||||||
extra = ""
|
extra = ""
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ async def test_deprecated_last_reset(
|
|||||||
f"with state_class {state_class} has set last_reset. Setting last_reset for "
|
f"with state_class {state_class} has set last_reset. Setting last_reset for "
|
||||||
"entities with state_class other than 'total' is not supported. Please update "
|
"entities with state_class other than 'total' is not supported. Please update "
|
||||||
"your configuration if state_class is manually configured, otherwise report it "
|
"your configuration if state_class is manually configured, otherwise report it "
|
||||||
"to the custom component author."
|
"to the custom integration author."
|
||||||
) in caplog.text
|
) in caplog.text
|
||||||
|
|
||||||
state = hass.states.get("sensor.test")
|
state = hass.states.get("sensor.test")
|
||||||
|
@ -775,7 +775,7 @@ def test_compile_hourly_sum_statistics_nan_inf_state(
|
|||||||
(
|
(
|
||||||
"sensor.custom_sensor",
|
"sensor.custom_sensor",
|
||||||
"from integration test ",
|
"from integration test ",
|
||||||
"report it to the custom component author",
|
"report it to the custom integration author",
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
@ -183,7 +183,7 @@ async def test_warning_close_session_custom(hass, caplog):
|
|||||||
await session.close()
|
await session.close()
|
||||||
assert (
|
assert (
|
||||||
"Detected integration that closes the Home Assistant aiohttp session. "
|
"Detected integration that closes the Home Assistant aiohttp session. "
|
||||||
"Please report issue to the custom component author for hue using this method at "
|
"Please report issue to the custom integration author for hue using this method at "
|
||||||
"custom_components/hue/light.py, line 23: await session.close()" in caplog.text
|
"custom_components/hue/light.py, line 23: await session.close()" in caplog.text
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -715,7 +715,7 @@ async def test_warn_slow_write_state_custom_component(hass, caplog):
|
|||||||
assert (
|
assert (
|
||||||
"Updating state for comp_test.test_entity "
|
"Updating state for comp_test.test_entity "
|
||||||
"(<class 'custom_components.bla.sensor.test_warn_slow_write_state_custom_component.<locals>.CustomComponentEntity'>) "
|
"(<class 'custom_components.bla.sensor.test_warn_slow_write_state_custom_component.<locals>.CustomComponentEntity'>) "
|
||||||
"took 10.000 seconds. Please report it to the custom component author."
|
"took 10.000 seconds. Please report it to the custom integration author."
|
||||||
) in caplog.text
|
) in caplog.text
|
||||||
|
|
||||||
|
|
||||||
|
@ -153,6 +153,6 @@ async def test_warning_close_session_custom(hass, caplog):
|
|||||||
await httpx_session.aclose()
|
await httpx_session.aclose()
|
||||||
assert (
|
assert (
|
||||||
"Detected integration that closes the Home Assistant httpx client. "
|
"Detected integration that closes the Home Assistant httpx client. "
|
||||||
"Please report issue to the custom component author for hue using this method at "
|
"Please report issue to the custom integration author for hue using this method at "
|
||||||
"custom_components/hue/light.py, line 23: await session.aclose()" in caplog.text
|
"custom_components/hue/light.py, line 23: await session.aclose()" in caplog.text
|
||||||
)
|
)
|
||||||
|
@ -168,7 +168,7 @@ async def test_check_loop_async_custom(caplog):
|
|||||||
hasync.check_loop(banned_function)
|
hasync.check_loop(banned_function)
|
||||||
assert (
|
assert (
|
||||||
"Detected blocking call to banned_function inside the event loop. This is "
|
"Detected blocking call to banned_function inside the event loop. This is "
|
||||||
"causing stability issues. Please report issue to the custom component author "
|
"causing stability issues. Please report issue to the custom integration author "
|
||||||
"for hue doing blocking calls at custom_components/hue/light.py, line 23: "
|
"for hue doing blocking calls at custom_components/hue/light.py, line 23: "
|
||||||
"self.light.is_on" in caplog.text
|
"self.light.is_on" in caplog.text
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user