MCPcopy
hub / github.com/rytilahti/python-miio / status

Function status

miio/integrations/vacuum/roborock/vacuum_cli.py:120–137  ·  view source on GitHub ↗

Returns the state information.

(vac: RoborockVacuum)

Source from the content-addressed store, hash-verified

118@cli.command()
119@pass_dev
120def 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()

Callers

nothing calls this directly

Calls 1

statusMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…