docs: def set_active(self, active):
          """Activate and deactivate an automation."""
          url = CONST.AUTOMATION_EDIT_URL
          url = url.replace(
              '$AUTOMATIONID$', self.automation_id)
  
          self._automation['is_active'] = str(int(active))
  
          response = self._abode.send_request(
              method="put", url=url, data=self._automation)
  
          response_object = json.loads(response.text)
  
          if isinstance(response_object, (tuple, list)):
              response_object = response_object[0]
  
          if (str(response_object['id']) != str(self._automation['id']) or
                  response_object['is_active'] != self._automation['is_active']):
              raise AbodeException((ERROR.INVALID_AUTOMATION_EDIT_RESPONSE))
  
          self.update(response_object)
  
          return True