humbertogontijo / homeassistant-roborock

Roborock integration for Home Assistant. This integration uses your devices from the Roborock App
GNU General Public License v3.0
661 stars 69 forks source link

Add "water tank attached" and "mop attached" sensors based on existing, available attributes #366

Open chriswood1001 opened 1 year ago

chriswood1001 commented 1 year ago

Is your feature request related to a problem? Please describe.

I create automations related to the state of both the water tank and the mop attached states. For example, if the mop has been attached for 3 runs then I send a phone notification to replace the mop, reset automatically once the "mop attached" state turns off. Or if the water tank is detached (forgotten by the sink) then I send a phone notification to refill and replace it.

Describe the solution you'd like

Extract the existing vacuum attributes into independent binary sensors.

Describe alternatives you've considered

I've created my own binary_sensor templates based on the vacuum attributes. Ideally they'd be natively exposed attributes since the data is already there.

Vacuum

Attributes are confirmed to reflect water tank and mop attached states for:

poudenes commented 1 year ago

Here all attributes that now shown up for a S8:

fan_speed_list:
  - 'off'
  - quiet
  - balanced
  - turbo
  - max
  - custom
  - max_plus
mop_mode_list:
  - standard
  - deep
  - custom
  - deep_plus
mop_intensity_list:
  - 'off'
  - mild
  - moderate
  - intense
  - custom
battery_level: 100
battery_icon: mdi:battery-charging-100
fan_speed: turbo
msgVer: 2
msgSeq: 2060
state: docked
battery: 100
cleanTime: 3733
cleanArea: 38070000
squareMeterCleanArea: 38.1
errorCode: 0
mapPresent: 1
inCleaning: 0
inReturning: 0
inFreshState: 1
labStatus: 1
waterBoxStatus: 1
fanPower: 103
dndEnabled: 0
mapStatus: 3
isLocating: 0
lockStatus: 0
waterBoxMode: 203
waterBoxCarriageStatus: 1
mopForbiddenEnable: 1
cameraStatus: 385
isExploring: 0
adbumperStatus:
  - 0
  - 0
  - 0
waterShortageStatus: 0
dockType: 0
dustCollectionStatus: 0
autoDustCollection: 1
avoidCount: 171
mopMode: 300
debugMode: 0
collisionAvoidStatus: 1
switchMapMode: 0
dockErrorStatus: 0
chargeStatus: 1
unsaveMapReason: 0
unsaveMapFlag: 0
status: charging
mop_mode: standard
mop_intensity: intense
error: null
icon: mdi:robot-vacuum
friendly_name: Roborock S8
supported_features: 16383
poudenes commented 1 year ago

waterBoxStatus attributes goes from 1 to 0 when water tank is removed

waterBoxCarriageStatus attributes goes from 1 to 0 when mop mount is removed mopForbiddenEnable attributes goes from 1 to 0 when mop mount is removed

When removing dusk bin out of the Roborock there is no attribute change from 1 to 0

vivdesign commented 1 year ago

waterBoxCarriageStatus doesn't change at all it is 1 all the time - S6 MaxV