From 08e6e27a3b74f50247f12d8db47300215076cb0c Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Sat, 17 Sep 2022 16:09:40 -0600 Subject: [PATCH] Remove deprecated Guardian services (scheduled for 2022.10.0) (#78663) Remove deprecated Guardian services (schedule for 2022.10.0) --- homeassistant/components/guardian/__init__.py | 36 ------------------- .../components/guardian/services.yaml | 22 ------------ 2 files changed, 58 deletions(-) diff --git a/homeassistant/components/guardian/__init__.py b/homeassistant/components/guardian/__init__.py index eccf845fcce..63fc66f685d 100644 --- a/homeassistant/components/guardian/__init__.py +++ b/homeassistant/components/guardian/__init__.py @@ -47,8 +47,6 @@ DATA_PAIRED_SENSOR_MANAGER = "paired_sensor_manager" SERVICE_NAME_DISABLE_AP = "disable_ap" SERVICE_NAME_ENABLE_AP = "enable_ap" SERVICE_NAME_PAIR_SENSOR = "pair_sensor" -SERVICE_NAME_REBOOT = "reboot" -SERVICE_NAME_RESET_VALVE_DIAGNOSTICS = "reset_valve_diagnostics" SERVICE_NAME_UNPAIR_SENSOR = "unpair_sensor" SERVICE_NAME_UPGRADE_FIRMWARE = "upgrade_firmware" @@ -56,8 +54,6 @@ SERVICES = ( SERVICE_NAME_DISABLE_AP, SERVICE_NAME_ENABLE_AP, SERVICE_NAME_PAIR_SENSOR, - SERVICE_NAME_REBOOT, - SERVICE_NAME_RESET_VALVE_DIAGNOSTICS, SERVICE_NAME_UNPAIR_SENSOR, SERVICE_NAME_UPGRADE_FIRMWARE, ) @@ -266,32 +262,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: await data.client.sensor.pair_sensor(uid) await data.paired_sensor_manager.async_pair_sensor(uid) - @call_with_data - async def async_reboot(call: ServiceCall, data: GuardianData) -> None: - """Reboot the valve controller.""" - async_log_deprecated_service_call( - hass, - call, - "button.press", - f"button.guardian_valve_controller_{data.entry.data[CONF_UID]}_reboot", - "2022.10.0", - ) - await data.client.system.reboot() - - @call_with_data - async def async_reset_valve_diagnostics( - call: ServiceCall, data: GuardianData - ) -> None: - """Fully reset system motor diagnostics.""" - async_log_deprecated_service_call( - hass, - call, - "button.press", - f"button.guardian_valve_controller_{data.entry.data[CONF_UID]}_reset_valve_diagnostics", - "2022.10.0", - ) - await data.client.valve.reset() - @call_with_data async def async_unpair_sensor(call: ServiceCall, data: GuardianData) -> None: """Remove a paired sensor.""" @@ -316,12 +286,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: SERVICE_PAIR_UNPAIR_SENSOR_SCHEMA, async_pair_sensor, ), - (SERVICE_NAME_REBOOT, SERVICE_BASE_SCHEMA, async_reboot), - ( - SERVICE_NAME_RESET_VALVE_DIAGNOSTICS, - SERVICE_BASE_SCHEMA, - async_reset_valve_diagnostics, - ), ( SERVICE_NAME_UNPAIR_SENSOR, SERVICE_PAIR_UNPAIR_SENSOR_SCHEMA, diff --git a/homeassistant/components/guardian/services.yaml b/homeassistant/components/guardian/services.yaml index 0707abb6978..7415ac626a9 100644 --- a/homeassistant/components/guardian/services.yaml +++ b/homeassistant/components/guardian/services.yaml @@ -17,28 +17,6 @@ pair_sensor: example: 5410EC688BCF selector: text: -reboot: - name: Reboot - description: Reboot the device. - fields: - device_id: - name: Valve Controller - description: The valve controller to reboot - required: true - selector: - device: - integration: guardian -reset_valve_diagnostics: - name: Reset Valve Diagnostics - description: Fully (and irrecoverably) reset all valve diagnostics. - fields: - device_id: - name: Valve Controller - description: The valve controller whose diagnostics should be reset - required: true - selector: - device: - integration: guardian unpair_sensor: name: Unpair Sensor description: Remove a paired sensor from the valve controller.