mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00: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:
|
async def async_start_increasing_brightness(self) -> None:
|
||||||
"""Start increasing the light brightness."""
|
"""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)
|
self._async_has_action_or_raise(Action.START_INCREASING_BRIGHTNESS)
|
||||||
await self._hub.bond.action(
|
await self._hub.bond.action(
|
||||||
self._device.device_id, Action(Action.START_INCREASING_BRIGHTNESS)
|
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:
|
async def async_start_decreasing_brightness(self) -> None:
|
||||||
"""Start decreasing the light brightness."""
|
"""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)
|
self._async_has_action_or_raise(Action.START_DECREASING_BRIGHTNESS)
|
||||||
await self._hub.bond.action(
|
await self._hub.bond.action(
|
||||||
self._device.device_id, Action(Action.START_DECREASING_BRIGHTNESS)
|
self._device.device_id, Action(Action.START_DECREASING_BRIGHTNESS)
|
||||||
@ -213,6 +219,9 @@ class BondLight(BondBaseLight, BondEntity, LightEntity):
|
|||||||
|
|
||||||
async def async_stop(self) -> None:
|
async def async_stop(self) -> None:
|
||||||
"""Stop all actions and clear the queue."""
|
"""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)
|
self._async_has_action_or_raise(Action.STOP)
|
||||||
await self._hub.bond.action(self._device.device_id, Action(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:
|
start_increasing_brightness:
|
||||||
name: 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:
|
target:
|
||||||
entity:
|
entity:
|
||||||
integration: bond
|
integration: bond
|
||||||
@ -102,7 +102,7 @@ start_increasing_brightness:
|
|||||||
|
|
||||||
start_decreasing_brightness:
|
start_decreasing_brightness:
|
||||||
name: 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:
|
target:
|
||||||
entity:
|
entity:
|
||||||
integration: bond
|
integration: bond
|
||||||
@ -110,7 +110,7 @@ start_decreasing_brightness:
|
|||||||
|
|
||||||
stop:
|
stop:
|
||||||
name: 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:
|
target:
|
||||||
entity:
|
entity:
|
||||||
integration: bond
|
integration: bond
|
||||||
|
Loading…
x
Reference in New Issue
Block a user