Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate ISY994 custom cleanup entities service #85931

Merged
merged 2 commits into from
Jan 16, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Deprecate ISY994 custom cleanup entites service
  • Loading branch information
shbatm committed Jan 16, 2023
commit 34c834f02ac311b6978f71f8321ac8de26944f49
16 changes: 14 additions & 2 deletions homeassistant/components/isy994/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,13 @@ async def async_set_variable_service_handler(service: ServiceCall) -> None:
@callback
def async_cleanup_registry_entries(service: ServiceCall) -> None:
"""Remove extra entities that are no longer part of the integration."""
async_log_deprecated_service_call(
hass,
call=service,
alternate_service="isy994.reload",
alternate_target=None,
breaks_in_ha_version="2023.5.0",
)
for config_entry_id in hass.data[DOMAIN]:
_async_cleanup_registry_entries(hass, config_entry_id)

Expand Down Expand Up @@ -492,13 +499,18 @@ def async_log_deprecated_service_call(
},
)

alternate = (
f' and pass it a target entity ID of "{alternate_target}"'
if alternate_target
else ""
)
shbatm marked this conversation as resolved.
Show resolved Hide resolved
_LOGGER.warning(
(
'The "%s" service is deprecated and will be removed in %s; use the "%s" '
'service and pass it a target entity ID of "%s"'
"service %s"
),
deprecated_service,
breaks_in_ha_version,
alternate_service,
alternate_target,
alternate,
)