From 3360a95156d69f072aa000494aadbc7d51403075 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 22 Jan 2022 22:24:40 -1000 Subject: [PATCH] Add warning when calling deprecated bond services (#64744) --- homeassistant/components/bond/light.py | 9 +++++++++ homeassistant/components/bond/services.yaml | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/bond/light.py b/homeassistant/components/bond/light.py index 973cb0f4eb9..b5728ec47d4 100644 --- a/homeassistant/components/bond/light.py +++ b/homeassistant/components/bond/light.py @@ -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)) diff --git a/homeassistant/components/bond/services.yaml b/homeassistant/components/bond/services.yaml index 4ad2b4f9bb3..821f7156af6 100644 --- a/homeassistant/components/bond/services.yaml +++ b/homeassistant/components/bond/services.yaml @@ -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