roborock.exceptions
Roborock exceptions.
1"""Roborock exceptions.""" 2 3from __future__ import annotations 4 5 6class RoborockException(Exception): 7 """Class for Roborock exceptions.""" 8 9 10class RoborockTimeout(RoborockException): 11 """Class for Roborock timeout exceptions.""" 12 13 14class RoborockConnectionException(RoborockException): 15 """Class for Roborock connection exceptions.""" 16 17 18class RoborockBackoffException(RoborockException): 19 """Class for Roborock exceptions when many retries were made.""" 20 21 22class VacuumError(RoborockException): 23 """Class for vacuum errors.""" 24 25 26class CommandVacuumError(RoborockException): 27 """Class for command vacuum errors.""" 28 29 def __init__(self, command: str | None, vacuum_error: VacuumError): 30 self.message = f"{command or 'unknown'}: {str(vacuum_error)}" 31 super().__init__(self.message) 32 33 34class UnknownMethodError(RoborockException): 35 """Class for an invalid method being sent.""" 36 37 38class RoborockAccountDoesNotExist(RoborockException): 39 """Class for Roborock account does not exist exceptions.""" 40 41 42class RoborockUrlException(RoborockException): 43 """Class for being unable to get the URL for the Roborock account.""" 44 45 46class RoborockInvalidCode(RoborockException): 47 """Class for Roborock invalid code exceptions.""" 48 49 50class RoborockInvalidEmail(RoborockException): 51 """Class for Roborock invalid formatted email exceptions.""" 52 53 54class RoborockInvalidUserAgreement(RoborockException): 55 """Class for Roborock invalid user agreement exceptions.""" 56 57 58class RoborockNoUserAgreement(RoborockException): 59 """Class for Roborock no user agreement exceptions.""" 60 61 62class RoborockInvalidCredentials(RoborockException): 63 """Class for Roborock credentials have expired or changed.""" 64 65 66class RoborockTooFrequentCodeRequests(RoborockException): 67 """Class for Roborock too frequent code requests exceptions.""" 68 69 70class RoborockMissingParameters(RoborockException): 71 """Class for Roborock missing parameters exceptions.""" 72 73 74class RoborockTooManyRequest(RoborockException): 75 """Class for Roborock too many request exceptions.""" 76 77 78class RoborockRateLimit(RoborockException): 79 """Class for our rate limits exceptions.""" 80 81 82class RoborockNoResponseFromBaseURL(RoborockException): 83 """We could not find an url that had a record of the given account.""" 84 85 86class RoborockDeviceBusy(RoborockException): 87 """Class for Roborock device busy exceptions.""" 88 89 90class RoborockUnsupportedFeature(RoborockException): 91 """Class for Roborock unsupported feature exceptions."""
Class for Roborock exceptions.
Class for Roborock timeout exceptions.
15class RoborockConnectionException(RoborockException): 16 """Class for Roborock connection exceptions."""
Class for Roborock connection exceptions.
19class RoborockBackoffException(RoborockException): 20 """Class for Roborock exceptions when many retries were made."""
Class for Roborock exceptions when many retries were made.
Class for vacuum errors.
27class CommandVacuumError(RoborockException): 28 """Class for command vacuum errors.""" 29 30 def __init__(self, command: str | None, vacuum_error: VacuumError): 31 self.message = f"{command or 'unknown'}: {str(vacuum_error)}" 32 super().__init__(self.message)
Class for command vacuum errors.
Class for an invalid method being sent.
39class RoborockAccountDoesNotExist(RoborockException): 40 """Class for Roborock account does not exist exceptions."""
Class for Roborock account does not exist exceptions.
43class RoborockUrlException(RoborockException): 44 """Class for being unable to get the URL for the Roborock account."""
Class for being unable to get the URL for the Roborock account.
47class RoborockInvalidCode(RoborockException): 48 """Class for Roborock invalid code exceptions."""
Class for Roborock invalid code exceptions.
51class RoborockInvalidEmail(RoborockException): 52 """Class for Roborock invalid formatted email exceptions."""
Class for Roborock invalid formatted email exceptions.
55class RoborockInvalidUserAgreement(RoborockException): 56 """Class for Roborock invalid user agreement exceptions."""
Class for Roborock invalid user agreement exceptions.
59class RoborockNoUserAgreement(RoborockException): 60 """Class for Roborock no user agreement exceptions."""
Class for Roborock no user agreement exceptions.
63class RoborockInvalidCredentials(RoborockException): 64 """Class for Roborock credentials have expired or changed."""
Class for Roborock credentials have expired or changed.
67class RoborockTooFrequentCodeRequests(RoborockException): 68 """Class for Roborock too frequent code requests exceptions."""
Class for Roborock too frequent code requests exceptions.
71class RoborockMissingParameters(RoborockException): 72 """Class for Roborock missing parameters exceptions."""
Class for Roborock missing parameters exceptions.
75class RoborockTooManyRequest(RoborockException): 76 """Class for Roborock too many request exceptions."""
Class for Roborock too many request exceptions.
Class for our rate limits exceptions.
83class RoborockNoResponseFromBaseURL(RoborockException): 84 """We could not find an url that had a record of the given account."""
We could not find an url that had a record of the given account.
Class for Roborock device busy exceptions.
91class RoborockUnsupportedFeature(RoborockException): 92 """Class for Roborock unsupported feature exceptions."""
Class for Roborock unsupported feature exceptions.