1 """Helpers for generating issues."""
3 from __future__
import annotations
9 from .helpers
import Observation
13 hass: HomeAssistant, observations: list[Observation], text: str =
""
15 """If there are mirrored entries, the user is probably using a workaround for a patched bug."""
16 if len(observations) != 2:
18 if observations[0].is_mirror(observations[1]):
19 ir.async_create_issue(
22 "mirrored_entry/" + text,
23 breaks_in_ha_version=
"2022.10.0",
25 severity=ir.IssueSeverity.WARNING,
26 translation_key=
"manual_migration",
27 translation_placeholders={
"entity": text},
28 learn_more_url=
"https://github.com/home-assistant/core/pull/67631",
34 """In previous 2022.9 and earlier, prob_given_false was optional and had a default version."""
35 ir.async_create_issue(
38 f
"no_prob_given_false/{text}",
39 breaks_in_ha_version=
"2022.10.0",
41 severity=ir.IssueSeverity.ERROR,
42 translation_key=
"no_prob_given_false",
43 translation_placeholders={
"entity": text},
44 learn_more_url=
"https://github.com/home-assistant/core/pull/67631",
None raise_mirrored_entries(HomeAssistant hass, list[Observation] observations, str text="")
None raise_no_prob_given_false(HomeAssistant hass, str text)