mirror of
https://github.com/home-assistant/core
synced 2024-08-02 23:40:32 +02:00
Add warning when calling deprecated bond services (#64744)
This commit is contained in:
parent
2ed30ac361
commit
3360a95156
@ -199,6 +199,9 @@ class BondLight(BondBaseLight, BondEntity, LightEntity):
|
||||
|
||||
async def async_start_increasing_brightness(self) -> None:
|
||||
"""Start increasing the light brightness."""
|
||||
_LOGGER.warning(
|
||||
"The bond.start_increasing_brightness service is deprecated and has been replaced with a button; Call the button.press service instead"
|
||||
)
|
||||
self._async_has_action_or_raise(Action.START_INCREASING_BRIGHTNESS)
|
||||
await self._hub.bond.action(
|
||||
self._device.device_id, Action(Action.START_INCREASING_BRIGHTNESS)
|
||||
@ -206,6 +209,9 @@ class BondLight(BondBaseLight, BondEntity, LightEntity):
|
||||
|
||||
async def async_start_decreasing_brightness(self) -> None:
|
||||
"""Start decreasing the light brightness."""
|
||||
_LOGGER.warning(
|
||||
"The bond.start_decreasing_brightness service is deprecated and has been replaced with a button; Call the button.press service instead"
|
||||
)
|
||||
self._async_has_action_or_raise(Action.START_DECREASING_BRIGHTNESS)
|
||||
await self._hub.bond.action(
|
||||
self._device.device_id, Action(Action.START_DECREASING_BRIGHTNESS)
|
||||
@ -213,6 +219,9 @@ class BondLight(BondBaseLight, BondEntity, LightEntity):
|
||||
|
||||
async def async_stop(self) -> None:
|
||||
"""Stop all actions and clear the queue."""
|
||||
_LOGGER.warning(
|
||||
"The bond.stop service is deprecated and has been replaced with a button; Call the button.press service instead"
|
||||
)
|
||||
self._async_has_action_or_raise(Action.STOP)
|
||||
await self._hub.bond.action(self._device.device_id, Action(Action.STOP))
|
||||
|
||||
|
@ -94,7 +94,7 @@ set_light_brightness_tracked_state:
|
||||
|
||||
start_increasing_brightness:
|
||||
name: Start increasing brightness
|
||||
description: "Start increasing the brightness of the light."
|
||||
description: "Start increasing the brightness of the light. (deprecated)"
|
||||
target:
|
||||
entity:
|
||||
integration: bond
|
||||
@ -102,7 +102,7 @@ start_increasing_brightness:
|
||||
|
||||
start_decreasing_brightness:
|
||||
name: Start decreasing brightness
|
||||
description: "Start decreasing the brightness of the light."
|
||||
description: "Start decreasing the brightness of the light. (deprecated)"
|
||||
target:
|
||||
entity:
|
||||
integration: bond
|
||||
@ -110,7 +110,7 @@ start_decreasing_brightness:
|
||||
|
||||
stop:
|
||||
name: Stop
|
||||
description: "Stop any in-progress action and empty the queue."
|
||||
description: "Stop any in-progress action and empty the queue. (deprecated)"
|
||||
target:
|
||||
entity:
|
||||
integration: bond
|
||||
|
Loading…
Reference in New Issue
Block a user