Skip to content

Commit

Permalink
Fixed problem with D8
Browse files Browse the repository at this point in the history
  • Loading branch information
BenjaminPaap committed Oct 20, 2022
1 parent 1b8663d commit 79bbde2
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion pyneato/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{
Required("floorplan_uuid"): str,
Required("rank_uuid"): str,
Required("name"): str,
Required("name"): Any(str, None),
"map_versions_count": int,
},
extra=ALLOW_EXTRA,
Expand Down
3 changes: 3 additions & 0 deletions pyneato/enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,6 @@ def from_str(mode: str):
return NavigationModeEnum.NORMAL
else:
raise NotImplementedError('NavigationMode %s'%mode)

class RobotErrorEnum(str, Enum):
DUSTBIN_MISSING = 'dustbin_missing'
3 changes: 1 addition & 2 deletions pyneato/floorplan.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
)

class Floorplan:
def __init__(self, session: Session, uuid: str, name: str, rank_uuid: str):
def __init__(self, session: Session, uuid: str, name: str | None, rank_uuid: str):
self._session = session
self.name = name
self.uuid = uuid
Expand Down Expand Up @@ -70,7 +70,6 @@ def refresh_tracks(self):
if track["name"] == None:
continue

_LOGGER.debug("Create Floorplan Track: %s"%(track["name"]))
try:
cleaning_mode = None
if None != track["cleaning_mode"]:
Expand Down
11 changes: 5 additions & 6 deletions pyneato/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ def _message(self, message: str, json: dict, schema: Schema):
:param json: dict containing data to send
:return: server response
"""

_LOGGER.debug(json)

try:
response = requests.post(
self._url + "?ability=%s"%message,
Expand All @@ -179,7 +176,11 @@ def _message(self, message: str, json: dict, schema: Schema):
return response

def start_cleaning(
self, floorplan: Floorplan, tracks: list[Track] = None, cleaning_mode = CleaningModeEnum.MAX, nogo_enabled = True
self,
floorplan: Floorplan,
tracks: list[Track] = None,
cleaning_mode = CleaningModeEnum.ECO,
nogo_enabled = True
):
ability_name = "cleaning.start"
runs = []
Expand Down Expand Up @@ -287,8 +288,6 @@ def info_robot(self):
result = self._base_message(RobotAbilityEnum.INFO.value, ROBOT_INFO_SCHEMA)
response = result["response"]

_LOGGER.debug(response.json())

return response.json()

def resume_cleaning(self) -> bool:
Expand Down
2 changes: 0 additions & 2 deletions pyneato/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ def _login(self, email: str, password: str) -> None:
headers=self.headers,
)

_LOGGER.warning("Status Code: %d"%(response.status_code))

response.raise_for_status()

self.access_token = response.json()["token"]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "pyneato"
version = "0.0.4"
version = "0.0.5"
authors = [
{ name="Benjamin Paap", email="[email protected]" },
]
Expand Down

0 comments on commit 79bbde2

Please sign in to comment.