diff --git a/homeassistant/components/rachio/__init__.py b/homeassistant/components/rachio/__init__.py index 772cd0085d3..7eaa76dedd4 100644 --- a/homeassistant/components/rachio/__init__.py +++ b/homeassistant/components/rachio/__init__.py @@ -35,7 +35,6 @@ from .const import ( KEY_TYPE, KEY_USERNAME, KEY_ZONES, - KEY_SCHEDULES, RACHIO_API_EXCEPTIONS, ) @@ -95,7 +94,7 @@ SUBTYPE_ZONE_CYCLING = "ZONE_CYCLING" SUBTYPE_ZONE_CYCLING_COMPLETED = "ZONE_CYCLING_COMPLETED" # Webhook callbacks -LISTEN_EVENT_TYPES = ["DEVICE_STATUS_EVENT", "ZONE_STATUS_EVENT", "SCHEDULE_STATUS_EVENT"] +LISTEN_EVENT_TYPES = ["DEVICE_STATUS_EVENT", "ZONE_STATUS_EVENT"] WEBHOOK_CONST_ID = "homeassistant.rachio:" WEBHOOK_PATH = URL_API + DOMAIN SIGNAL_RACHIO_UPDATE = DOMAIN + "_update" @@ -259,7 +258,6 @@ class RachioIro: self.mac_address = data[KEY_MAC_ADDRESS] self.model = data[KEY_MODEL] self._zones = data[KEY_ZONES] - self._schedules = data[KEY_SCHEDULES] self._init_data = data self._webhooks = webhooks _LOGGER.debug('%s has ID "%s"', str(self), self.controller_id) @@ -297,7 +295,6 @@ class RachioIro: for event_type in self.rachio.notification.getWebhookEventType()[1]: if event_type[KEY_NAME] in LISTEN_EVENT_TYPES: event_types.append({"id": event_type[KEY_ID]}) - # Register to listen to these events from the device url = self.rachio.webhook_url @@ -344,10 +341,6 @@ class RachioIro: return zone return None - - def list_schedules(self) -> list: - """Return a list of schedules.""" - return self._schedules def stop_watering(self) -> None: """Stop watering all zones connected to this controller.""" diff --git a/homeassistant/components/rachio/const.py b/homeassistant/components/rachio/const.py index 27ab5e831a7..fb66d4378f1 100644 --- a/homeassistant/components/rachio/const.py +++ b/homeassistant/components/rachio/const.py @@ -22,7 +22,6 @@ KEY_ID = "id" KEY_NAME = "name" KEY_MODEL = "model" KEY_ON = "on" -KEY_DURATION = "totalDuration" KEY_STATUS = "status" KEY_SUBTYPE = "subType" KEY_SUMMARY = "summary" @@ -34,8 +33,6 @@ KEY_USERNAME = "username" KEY_ZONE_ID = "zoneId" KEY_ZONE_NUMBER = "zoneNumber" KEY_ZONES = "zones" -KEY_SCHEDULES = "scheduleRules" -KEY_SCHEDULE_ID = "scheduleId" # Yes we really do get all these exceptions (hopefully rachiopy switches to requests) RACHIO_API_EXCEPTIONS = ( diff --git a/homeassistant/components/rachio/switch.py b/homeassistant/components/rachio/switch.py index 8f75fd230d4..5320d434d00 100644 --- a/homeassistant/components/rachio/switch.py +++ b/homeassistant/components/rachio/switch.py @@ -9,15 +9,11 @@ from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import ( SIGNAL_RACHIO_CONTROLLER_UPDATE, SIGNAL_RACHIO_ZONE_UPDATE, - SIGNAL_RACHIO_SCHEDULE_UPDATE, SUBTYPE_SLEEP_MODE_OFF, SUBTYPE_SLEEP_MODE_ON, SUBTYPE_ZONE_COMPLETED, SUBTYPE_ZONE_STARTED, SUBTYPE_ZONE_STOPPED, - SUBTYPE_SCHEDULE_COMPLETED, - SUBTYPE_SCHEDULE_STOPPED, - SUBTYPE_SCHEDULE_STARTED, RachioDeviceInfoProvider, ) from .const import ( @@ -29,23 +25,17 @@ from .const import ( KEY_ID, KEY_IMAGE_URL, KEY_NAME, - KEY_DURATION, KEY_ON, KEY_SUBTYPE, KEY_SUMMARY, KEY_ZONE_ID, KEY_ZONE_NUMBER, - KEY_SCHEDULES, - KEY_SCHEDULE_ID, ) _LOGGER = logging.getLogger(__name__) ATTR_ZONE_SUMMARY = "Summary" ATTR_ZONE_NUMBER = "Zone number" -ATTR_SCHEDULE_SUMMARY = "Summary" -ATTR_SCHEDULE_ENABLED = "Enabled" -ATTR_SCHEDULE_DURATION = "Duration" async def async_setup_entry(hass, config_entry, async_add_entities): @@ -64,7 +54,6 @@ def _create_entities(hass, config_entry): for controller in person.controllers: entities.append(RachioStandbySwitch(controller)) zones = controller.list_zones() - schedules = controller.list_schedules() current_schedule = controller.current_schedule _LOGGER.debug("Rachio setting up zones: %s", zones) for zone in zones: