8000 Google Assistant dosen't support non-StateVacuumDevice · Issue #18391 · home-assistant/core · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Google Assistant dosen't support non-StateVacuumDevice #18391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dbradley771 opened this issue Nov 12, 2018 · 13 comments
Closed

Google Assistant dosen't support non-StateVacuumDevice #18391

dbradley771 opened this issue Nov 12, 2018 · 13 comments

Comments

@dbradley771
Copy link
dbradley771 commented Nov 12, 2018

Home Assistant release with the issue:
Home Assistant 0.82.0

Last working Home Assistant release (if known):
None

Operating environment (Hass.io/Docker/Windows/etc.):
Windows 10 Home

Component/platform:
Google Assistant
Vacuum cleaner robots

Description of problem:
The new Google Assistant vacuum support added in #17657 only seems to work with the relatively new StateVacuumDevice vacuums (added in #15573). I believe this is because the StartStopTrait for Google Assistant only uses vacuum.SERVICE_START, which is only available to StateVacuumDevice and not the regular VacuumDevice.

I looked into fixing this but am unsure of what the proper way would be. Here is what I thought of so far:

  • Easy Option: Have the StartStopTrait check to see if the vacuum supports SERVICE_START and use it, otherwise use SERVICE_TURN_ON. This would support both StateVacuumDevice and regular VacuumDevice.
  • Other Option: Create service in _BaseVacuum that starts/turns on the vacuum by calling the appropriate start or turn on command for the subclass, or just make this a standard start command.
  • Current/Hard Option: Update all vacuums to use StateVacuumDevice instead of VacuumDevice.

...or another way I didn't think of. It seems weird that there is a STOP command but not a START command in _BaseVacuum. Is it a goal to move everything over to StateVacuumDevices?

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

google_assistant:
  project_id: !secret google_project_id
  api_key: !secret google_api_key
  expose_by_default: false
  entity_config:
    vacuum.living_room:
      expose: true
      name: 'Living Room Vacuum'

ecovacs:
  username: !secret vacuum_email
  password: !secret vacuum_password
  country: US
  continent: NA

Traceback (if applicable):

2018-11-11 16:56:16 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "C:\Program Files\Python36\lib\site-packages\homeassistant\helpers\service.py", line 224, in _handle_service_platform_call
    await getattr(entity, func)(**data)
AttributeError: 'EcovacsVacuum' object has no attribute 'async_start'
@kmlucy
Copy link
kmlucy commented Nov 19, 2018

I'm having the same issue. 'Stop' also isn't working, but 'pause' and 'charge' work.

@dshokouhi
Copy link
Member

I thought the plan was to move all vacuum platforms to the new StateVacuumDevice method, that was actually the intention behind the new states for vacuums.

home-assistant/architecture#29

@dbradley771
Copy link
Author

I'm having the same issue. 'Stop' also isn't working, but 'pause' and 'charge' work.

Interesting. Didn't seem like that could happen from the code I looked over. What vacuum are you using?

I thought the plan was to move all vacuum platforms to the new StateVacuumDevice method, that was actually the intention behind the new states for vacuums.

That's what I assumed as it dosen't seem great to have two options. I guess we'll just have to go down the route of updating them all, unless anyone has a better idea...

@dshokouhi
Copy link
Member

@dbradley771 in order to respond to the query requests sent from google you need to have the other platforms updated for the new states. Neato and Xiaomi have already been updated to support this. I recommend updating your platform to support the new model to take advantage of it.

@dbradley771
Copy link
Author

@dbradley771 in order to respond to the query requests sent from google you need to have the other platforms updated for the new states. Neato and Xiaomi have already been updated to support this. I recommend updating your platform to support the new model to take advantage of it.

Makes sense. I'll look into updating Ecovacs, since that's what I have.

@OverloadUT you seem to have knowledge on the Ecovacs vacuum. Is it possible to update it to use StateVacuumDevice?

@OverloadUT
Copy link
Contributor

Yes, migrating Ecovacs to StateVacuumDevice is on my roadmap, but personal development has been slow so I am happy to review someone else's PR if they've got more time right now. Ecovacs has a couple of critical issues that I need to fix as well :(

@kmlucy
Copy link
kmlucy commented Nov 20, 2018

@dbradley771 I have a N79. It's not the same error as with start. With start, Google thinks it's fine but I get an error in my Home Assistant Logs. With stop, Google throws an error and nothing shows up in my Home Assistant Logs.

@dbradley771
Copy link
Author

@kmlucy Hmm, no logs ya say? I'm guessing Google is giving the standard "Sorry, something went wrong"?

Home Assistant doesn't show the stop command in the logs?

@kmlucy
Copy link
kmlucy commented Nov 20, 2018

Right on all counts.

@dbradley771
Copy link
Author

I wonder if telling Google to re-sync might help. I don't know too much about the Google Assistant or Ecovacs systems, so I can't fully digestions your problems. Although it sounds like a Google Assistant problem to me...

@kmlucy
Copy link
kmlucy commented Nov 20, 2018

I didn't even need to resync. Whatever was causing the error yesterday is gone and 'stop' is working now. Thanks for the help. 'Start' still isn't working, but thats in the known scope of this issue.

@marchingphoenix
Copy link
Contributor

Google Assistant Trait working as intended. vacuum components will need to be updated to support the vacuum.SERVICE_START service.

@marchingphoenix
Copy link
Contributor

Closing as there has been no further comment in 30 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
0