natekspencer / hacs-litterrobot

Home Assistant integration for a Litter-Robot Connect self-cleaning litter box
MIT License
8 stars 1 forks source link

A couple of issues... #3

Closed flyize closed 3 years ago

flyize commented 3 years ago

You had mentioned that this integration has the ability to 'power off' the litter box. Where is that done? I don't see a switch for it.

Also, when I powered it off via the app, the vacuum entity showed its state as 'error'.

Thanks for this!

natekspencer commented 3 years ago

There's a few built in services for the vacuum component, including "vacuum.turn_off" and "vacuum.turn_on", that I utilized for this functionality, rather than creating a new switch for it. You can see this and test the functionality via Developer Tools->Services

I haven't figured out how exactly I want to represent the "off" status for this and chose "error" for the time being because you can't do anything else with the litter box until you call the service to turn it back on. Obviously, that's probably not ideal, heh.

natekspencer commented 3 years ago

I'm also still learning how to program components for Home Assistant and all the various nuances, haha. I think I found something though, let me give it a try.

natekspencer commented 3 years ago

Ok, I just pushed an update to this @flyize. You'll still have to call the service "vacuum.turn_off" from an automation or create your own template switch to turn it off via lovelace. But when it is off, the entity card for the vacuum will show a command to "Turn On". Also the state now reports as "Off" instead of "Error".