Returns the state information.
(vac: RoborockVacuum)
| 118 | @cli.command() |
| 119 | @pass_dev |
| 120 | def status(vac: RoborockVacuum): |
| 121 | """Returns the state information.""" |
| 122 | res = vac.status() |
| 123 | if not res: |
| 124 | return # bail out |
| 125 | |
| 126 | if res.error_code: |
| 127 | click.echo(click.style("Error: %s !" % res.error, bold=True, fg="red")) |
| 128 | if res.is_water_shortage: |
| 129 | click.echo(click.style("Water is running low!", bold=True, fg="blue")) |
| 130 | click.echo(click.style("State: %s" % res.state, bold=True)) |
| 131 | click.echo("Battery: %s %%" % res.battery) |
| 132 | click.echo("Fanspeed: %s %%" % res.fanspeed) |
| 133 | click.echo("Cleaning since: %s" % res.clean_time) |
| 134 | click.echo("Cleaned area: %s m²" % res.clean_area) |
| 135 | click.echo("Water box attached: %s" % res.is_water_box_attached) |
| 136 | if res.is_water_box_carriage_attached is not None: |
| 137 | click.echo("Mop attached: %s" % res.is_water_box_carriage_attached) |
| 138 | |
| 139 | |
| 140 | @cli.command() |
nothing calls this directly
no test coverage detected
searching dependent graphs…