mirror of
https://github.com/home-assistant/core.git
synced 2025-11-06 01:19:29 +00:00
Split long strings in components (#135263)
This commit is contained in:
@@ -131,7 +131,10 @@ def _no_overlapping(configs: list[dict]) -> list[dict]:
|
||||
for i, tup in enumerate(intervals):
|
||||
if len(intervals) > i + 1 and tup.below > intervals[i + 1].above:
|
||||
raise vol.Invalid(
|
||||
f"Ranges for bayesian numeric state entities must not overlap, but {ent_id} has overlapping ranges, above:{tup.above}, below:{tup.below} overlaps with above:{intervals[i+1].above}, below:{intervals[i+1].below}."
|
||||
"Ranges for bayesian numeric state entities must not overlap, "
|
||||
f"but {ent_id} has overlapping ranges, above:{tup.above}, "
|
||||
f"below:{tup.below} overlaps with above:{intervals[i + 1].above}, "
|
||||
f"below:{intervals[i + 1].below}."
|
||||
)
|
||||
return configs
|
||||
|
||||
@@ -206,7 +209,10 @@ async def async_setup_platform(
|
||||
broken_observations: list[dict[str, Any]] = []
|
||||
for observation in observations:
|
||||
if CONF_P_GIVEN_F not in observation:
|
||||
text: str = f"{name}/{observation.get(CONF_ENTITY_ID,'')}{observation.get(CONF_VALUE_TEMPLATE,'')}"
|
||||
text = (
|
||||
f"{name}/{observation.get(CONF_ENTITY_ID, '')}"
|
||||
f"{observation.get(CONF_VALUE_TEMPLATE, '')}"
|
||||
)
|
||||
raise_no_prob_given_false(hass, text)
|
||||
_LOGGER.error("Missing prob_given_false YAML entry for %s", text)
|
||||
broken_observations.append(observation)
|
||||
|
||||
Reference in New Issue
Block a user