BenjaminPaap / home-assistant-myneato

Home Assistant integration to control a neato vacuum robot from D8 and up using the MyNeato App
25 stars 2 forks source link

RobotActionEnum missing state 'cleaning_standby' #14

Open dchote opened 9 months ago

dchote commented 9 months ago

I just added this integration while my robot was mid-clean and it seems to error out on a missing state cleaning_standby. I can submit a PR if that would be preferred.

myneato: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 575, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_device_update
    await hass.async_add_executor_job(self.update)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/myneato/vacuum.py", line 156, in update
    self._state = self.robot.state
                  ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyneato/robot.py", line 316, in state
    return self.get_state()
           ^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyneato/robot.py", line 262, in get_state
    RobotActionEnum(json["action"]),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 712, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1135, in __new__
    raise ve_exc
ValueError: 'cleaning_standby' is not a valid RobotActionEnum
BenjaminPaap commented 9 months ago

I would love to see a PR for that