mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Move Phone Modem reject call deprecation warning (#67223)
This commit is contained in:
parent
684f01f466
commit
0bd25a192d
@ -44,13 +44,7 @@ async def async_setup_entry(
|
|||||||
)
|
)
|
||||||
|
|
||||||
platform = entity_platform.async_get_current_platform()
|
platform = entity_platform.async_get_current_platform()
|
||||||
|
|
||||||
platform.async_register_entity_service(SERVICE_REJECT_CALL, {}, "async_reject_call")
|
platform.async_register_entity_service(SERVICE_REJECT_CALL, {}, "async_reject_call")
|
||||||
_LOGGER.warning(
|
|
||||||
"Calling reject_call service is deprecated and will be removed after 2022.4; "
|
|
||||||
"A new button entity is now available with the same function "
|
|
||||||
"and replaces the existing service"
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ModemCalleridSensor(SensorEntity):
|
class ModemCalleridSensor(SensorEntity):
|
||||||
@ -94,4 +88,9 @@ class ModemCalleridSensor(SensorEntity):
|
|||||||
|
|
||||||
async def async_reject_call(self) -> None:
|
async def async_reject_call(self) -> None:
|
||||||
"""Reject Incoming Call."""
|
"""Reject Incoming Call."""
|
||||||
|
_LOGGER.warning(
|
||||||
|
"Calling reject_call service is deprecated and will be removed after 2022.4; "
|
||||||
|
"A new button entity is now available with the same function "
|
||||||
|
"and replaces the existing service"
|
||||||
|
)
|
||||||
await self.api.reject_call(self.device)
|
await self.api.reject_call(self.device)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user