Enhance available mqtt_vacuum states

Hey guys,

I already opened up this feature request on github, so hopefully now I’m in the right place.

The problem

the mqtt-vacuum integration currently only lists a limited amount of different states

cleaning,
docked,
paused,
idle,
returning,
error.

When using the integration from the vacuum itself there are more states available which are then mapped to one of the available ones, for example one of the states the xiaomi roborck has is going_to_target, if, well, you guessed it, the robot drives to the target destination. Right now it maps to cleaning state though.

Here is the current mapping for the xiaomi roborock from the valetudo addon.

// Codes as per Status.js
const HA_STATE_MAPPINGS = {
"CHARGER_DISCONNECTED": HA_STATES.IDLE,
"IDLE": HA_STATES.IDLE,
"CLEANING": HA_STATES.CLEANING,
"MANUAL_MODE": HA_STATES.CLEANING,
"SPOT_CLEANING": HA_STATES.CLEANING,
"GOING_TO_TARGET": HA_STATES.CLEANING,
"ZONED_CLEANING": HA_STATES.ZONE_CLEANUP,
"RETURNING_HOME": HA_STATES.RETURNING,
"DOCKING": HA_STATES.RETURNING,
"CHARGING": HA_STATES.DOCKED,
"CHARGING_PROBLEM": HA_STATES.ERROR,
"ERROR": HA_STATES.ERROR,
"PAUSED": HA_STATES.PAUSED,

Environment

Additional information

It would be great if the missing states the robot provides could be made available in the mqtt.vacuum integration. Here is my proposal for the new states (marked the new states as bold)

CHARGER_DISCONNECTED,
IDLE,
CLEANING,
MANUAL_MODE,
SPOT_CLEANING,
GOING_TO_TARGET,
ZONED_CLEANING,
RETURNING,
DOCKING,
CHARGING
CHARGING_PROBLEM
ERROR,
PAUSED

Subscribed. Interesting

Also for whatever reason, trigger “returning” (from: returning to: docked) stopped working in some of the last releases (now on 2022.7.x). The Automation just stopped triggering. Worked for more than a year. I use it to only trigger automatic cleanup once a day (it triggers a “vacuuming done for today” binary switch helper.