mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 03:07:37 +00:00
Don't create Repairs issue on RainMachine entity replacement (#79310)
* Don't create Repairs issue on RainMachine entity replacement * Strings
This commit is contained in:
parent
db1797beb4
commit
d742e65ef5
@ -27,18 +27,5 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"issues": {
|
|
||||||
"replaced_old_entity": {
|
|
||||||
"title": "The {old_entity_id} entity will be removed",
|
|
||||||
"fix_flow": {
|
|
||||||
"step": {
|
|
||||||
"confirm": {
|
|
||||||
"title": "The {old_entity_id} entity will be removed",
|
|
||||||
"description": "Update any automations or scripts that use this entity to instead use `{replacement_entity_id}`."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -18,19 +18,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"issues": {
|
|
||||||
"replaced_old_entity": {
|
|
||||||
"fix_flow": {
|
|
||||||
"step": {
|
|
||||||
"confirm": {
|
|
||||||
"description": "Update any automations or scripts that use this entity to instead use `{replacement_entity_id}`.",
|
|
||||||
"title": "The {old_entity_id} entity will be removed"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"title": "The {old_entity_id} entity will be removed"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"options": {
|
"options": {
|
||||||
"step": {
|
"step": {
|
||||||
"init": {
|
"init": {
|
||||||
|
@ -14,10 +14,9 @@ from homeassistant.helpers.dispatcher import (
|
|||||||
async_dispatcher_connect,
|
async_dispatcher_connect,
|
||||||
async_dispatcher_send,
|
async_dispatcher_send,
|
||||||
)
|
)
|
||||||
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
|
||||||
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
|
||||||
|
|
||||||
from .const import DOMAIN, LOGGER
|
from .const import LOGGER
|
||||||
|
|
||||||
SIGNAL_REBOOT_COMPLETED = "rainmachine_reboot_completed_{0}"
|
SIGNAL_REBOOT_COMPLETED = "rainmachine_reboot_completed_{0}"
|
||||||
SIGNAL_REBOOT_REQUESTED = "rainmachine_reboot_requested_{0}"
|
SIGNAL_REBOOT_REQUESTED = "rainmachine_reboot_requested_{0}"
|
||||||
@ -70,23 +69,6 @@ def async_finish_entity_domain_replacements(
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
old_entity_id = registry_entry.entity_id
|
old_entity_id = registry_entry.entity_id
|
||||||
translation_key = "replaced_old_entity"
|
|
||||||
|
|
||||||
async_create_issue(
|
|
||||||
hass,
|
|
||||||
DOMAIN,
|
|
||||||
f"{translation_key}_{old_entity_id}",
|
|
||||||
breaks_in_ha_version=strategy.breaks_in_ha_version,
|
|
||||||
is_fixable=True,
|
|
||||||
is_persistent=True,
|
|
||||||
severity=IssueSeverity.WARNING,
|
|
||||||
translation_key=translation_key,
|
|
||||||
translation_placeholders={
|
|
||||||
"old_entity_id": old_entity_id,
|
|
||||||
"replacement_entity_id": strategy.replacement_entity_id,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
if strategy.remove_old_entity:
|
if strategy.remove_old_entity:
|
||||||
LOGGER.info('Removing old entity: "%s"', old_entity_id)
|
LOGGER.info('Removing old entity: "%s"', old_entity_id)
|
||||||
ent_reg.async_remove(old_entity_id)
|
ent_reg.async_remove(old_entity_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user