Remove deprecated Guardian services (scheduled for 2022.10.0) (#78663)

Remove deprecated Guardian services (schedule for 2022.10.0)
pull/76878/head^2
Aaron Bach 2022-09-17 16:09:40 -06:00 committed by GitHub
parent 18eef5da1f
commit 08e6e27a3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 58 deletions

View File

@ -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,

View File

@ -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.