No enitiy_id created Roborock S7

BTW, these are the sensors created to help display some information on the cards.

# Roborock S7
- platform: template
  sensors:
    # Used for the Filter maintenance card
    lucineide_filter_remaining:
      friendly_name: 'HEPA Filter Life (%)'
      unit_of_measurement: '%'
      value_template: "{{((state_attr('vacuum.lucineide', 'filter_left') / 150) * 100) | round | int}}"

    # Used for the Filter maintenance card
    lucineide_filter_hrs_remaining:
      friendly_name: 'HEPA Filter Life (hr)'
      unit_of_measurement: 'hrs'
      value_template: "{{state_attr('vacuum.lucineide', 'filter_left')}}"

    # Used for the Side Brush maintenance card
    lucineide_side_brush_remaining:
      friendly_name: 'Side Brush Life (%)'
      unit_of_measurement: '%'
      value_template: "{{((state_attr('vacuum.lucineide', 'side_brush_left') / 200) * 100) | round | int}}"

    # Used for the Side Brush maintenance card
    lucineide_side_brush_hrs_remaining:
      friendly_name: 'Side Brush Life (hr)'
      unit_of_measurement: 'hrs'
      value_template: "{{state_attr('vacuum.lucineide', 'side_brush_left')}}"

    # Used for the Main Brush maintenance card
    lucineide_main_brush_remaining:
      friendly_name: 'Main Brush Life (%)'
      unit_of_measurement: '%'
      value_template: "{{((state_attr('vacuum.lucineide', 'main_brush_left') / 300) * 100) | round | int}}"

    # Used for the Main Brush maintenance card
    lucineide_main_brush_hrs_remaining:
      friendly_name: 'Main Brush Life (hr)'
      unit_of_measurement: 'hrs'
      value_template: "{{state_attr('vacuum.lucineide', 'main_brush_left')}}"

    # Used for the Sensors maintenance card
    lucineide_sensors_remaining:
      friendly_name: 'Sensors Usage (%)'
      unit_of_measurement: '%'
      value_template: "{{((state_attr('vacuum.lucineide', 'sensor_dirty_left') / 30) * 100) | round | int}}"

    # Used for the Sensors maintenance card
    lucineide_sensors_hrs_remaining:
      friendly_name: 'Sensors Usage (hr)'
      unit_of_measurement: 'hrs'
      value_template: "{{state_attr('vacuum.lucineide', 'sensor_dirty_left')}}"
3 Likes

Thank you all for all this lovely sharing !
Finally got the Roborock S7 fully integrated in HA, I’m loving it :


:slight_smile:

1 Like

You are welcome.

BTW, nice vacuum card!

@MrFroggy Many Many Many thanks for all your efforts giving me tips and advises regardind this.
Now i was capable to add cards and the sensors like you told me .

I just missing the part when i click start and choose the times per zone.
i already got the zones as you said , but don know how to fetch for the button in a automation :wink:
But thanks for your time till now teaching me.

Nice work Nuno! I think with this post you will be able to finish your work. Good luck!

For those like Nuno who wants to implement exacly like I did, here is the code for NodeRed to make the automation for starting the vacuum robot using the HomeAssistant Helpers.

[{"id":"a63c9be1.ee95e8","type":"tab","label":"ROBOROCK","disabled":false,"info":""},{"id":"9bd5bba6.b09488","type":"group","z":"a63c9be1.ee95e8","style":{"stroke":"#2e333a","stroke-opacity":"1","fill":"#2e333a","fill-opacity":"0.75","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["bcbfcc5f.dec3d","bc974841.0bf828","d7b24b12.9306a8","cd96eee1.fadce","a843828c.34b51","ea8cb3eb.ca3dd","5f5c1f29.1e211"],"x":34,"y":39,"w":752,"h":282},{"id":"cd8aadb2.eebf3","type":"group","z":"a63c9be1.ee95e8","style":{"stroke":"#2e333a","stroke-opacity":"1","fill":"#2e333a","fill-opacity":"0.75","label":true,"label-position":"nw","color":"#a4a4a4"},"nodes":["5e914371.29870c","6363998a.ea18e8","43566311.cfc4bc","19ab0b03.339475","e79d9671.407078","95e97a0a.01ba08","276759e4.88efa6","c68102e8.586f9","ee1f2a20.03e478","4a47b2ac.38a22c","3ab58380.4da0fc","d2748058.b24fe","6b6ec088.76894","32cb9922.3b9436"],"x":34,"y":359,"w":1532,"h":302},{"id":"bcbfcc5f.dec3d","type":"api-call-service","z":"a63c9be1.ee95e8","g":"9bd5bba6.b09488","name":"Map Update","server":"8d8136f8.6f7ef8","version":3,"debugenabled":false,"service_domain":"homeassistant","service":"update_entity","entityId":"camera.lucineide_map","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":690,"y":280,"wires":[["ea8cb3eb.ca3dd","a843828c.34b51"]]},{"id":"bc974841.0bf828","type":"server-state-changed","z":"a63c9be1.ee95e8","g":"9bd5bba6.b09488","name":"Robock Docked","server":"8d8136f8.6f7ef8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"vacuum.lucineide","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":280,"wires":[["cd96eee1.fadce"]]},{"id":"d7b24b12.9306a8","type":"delay","z":"a63c9be1.ee95e8","g":"9bd5bba6.b09488","name":"","pauseType":"delay","timeout":"4","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":580,"y":160,"wires":[["bcbfcc5f.dec3d"]]},{"id":"cd96eee1.fadce","type":"switch","z":"a63c9be1.ee95e8","g":"9bd5bba6.b09488","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"cleaning","vt":"str"},{"t":"eq","v":"returning","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":290,"y":280,"wires":[["bcbfcc5f.dec3d"],["bcbfcc5f.dec3d"]]},{"id":"a843828c.34b51","type":"api-current-state","z":"a63c9be1.ee95e8","g":"9bd5bba6.b09488","name":"cleaning","server":"8d8136f8.6f7ef8","version":2,"outputs":2,"halt_if":"cleaning","halt_if_type":"str","halt_if_compare":"is","entity_id":"vacuum.lucineide","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":400,"y":140,"wires":[["d7b24b12.9306a8"],[]]},{"id":"ea8cb3eb.ca3dd","type":"api-current-state","z":"a63c9be1.ee95e8","g":"9bd5bba6.b09488","name":"returning","server":"8d8136f8.6f7ef8","version":2,"outputs":2,"halt_if":"returning","halt_if_type":"str","halt_if_compare":"is","entity_id":"vacuum.lucineide","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"x":400,"y":200,"wires":[["d7b24b12.9306a8"],[]]},{"id":"5f5c1f29.1e211","type":"comment","z":"a63c9be1.ee95e8","g":"9bd5bba6.b09488","name":"Atualização do mapa do aspirador apenas quando está a funcionar","info":"","x":300,"y":80,"wires":[]},{"id":"5e914371.29870c","type":"comment","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Escolha de divisões e nr de limpezas","info":"","x":200,"y":400,"wires":[]},{"id":"6363998a.ea18e8","type":"server-state-changed","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Iniciar Aspiração","server":"8d8136f8.6f7ef8","version":3,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"input_boolean.aspirar_iniciar","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"eventData"},{"property":"topic","propertyType":"msg","value":"","valueType":"triggerId"}],"x":140,"y":520,"wires":[["43566311.cfc4bc"],[]]},{"id":"e79d9671.407078","type":"function","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Cozinha","func":"if (msg.payload.state == \"1.0\") {\n     msg.payload.value = \"20\";\n     return msg;\n} else if \n    (msg.payload.state == \"2.0\") {\n     msg.payload.value = \"20,20\";\n     return msg;\n} else {\n     msg.payload.value = \"20,20,20\";\n     return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":640,"y":460,"wires":[["4a47b2ac.38a22c"]]},{"id":"19ab0b03.339475","type":"switch","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"","property":"payload.entity_id","propertyType":"msg","rules":[{"t":"eq","v":"input_number.aspirar_cozinha","vt":"str"},{"t":"eq","v":"input_number.aspirar_sala","vt":"str"},{"t":"eq","v":"input_number.aspirar_escritorio","vt":"str"},{"t":"eq","v":"input_number.aspirar_hall_entrada","vt":"str"},{"t":"eq","v":"input_number.aspirar_wc","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":470,"y":520,"wires":[["e79d9671.407078"],["95e97a0a.01ba08"],["276759e4.88efa6"],["c68102e8.586f9"],["ee1f2a20.03e478"]],"outputLabels":["Cozinha","Sala","Escritório","Hall","WC"]},{"id":"d2748058.b24fe","type":"join","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"","mode":"custom","build":"array","property":"payload.value","propertyType":"msg","key":"topic","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"5","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1150,"y":540,"wires":[["6b6ec088.76894"]]},{"id":"43566311.cfc4bc","type":"ha-get-entities","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Divisões","server":"8d8136f8.6f7ef8","version":0,"rules":[{"property":"entity_id","logic":"starts_with","value":"input_number.aspirar_","valueType":"str"},{"property":"state","logic":"is_not","value":"0.0","valueType":"str"}],"output_type":"split","output_empty_results":false,"output_location_type":"msg","output_location":"payload","output_results_count":1,"x":320,"y":520,"wires":[["19ab0b03.339475"]]},{"id":"95e97a0a.01ba08","type":"function","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Sala","func":"if  (msg.payload.state == \"1.0\") {\n     msg.payload.value = \"19\";\n     return msg;\n} else if \n    (msg.payload.state == \"2.0\") {\n     msg.payload.value = \"19,19\";\n     return msg;\n} else {\n     msg.payload.value = \"19,19,19\";\n     return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":500,"wires":[["4a47b2ac.38a22c"]]},{"id":"276759e4.88efa6","type":"function","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Escritório","func":"if  (msg.payload.state == \"1.0\") {\n     msg.payload.value = \"21\";\n     return msg;\n} else if \n    (msg.payload.state == \"2.0\") {\n     msg.payload.value = \"21,21\";\n     return msg;\n} else {\n     msg.payload.value = \"21,21,21\";\n     return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":640,"y":540,"wires":[["4a47b2ac.38a22c"]]},{"id":"c68102e8.586f9","type":"function","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Hall","func":"if  (msg.payload.state == \"1.0\") {\n     msg.payload.value = \"16\";\n     return msg;\n} else if \n    (msg.payload.state == \"2.0\") {\n     msg.payload.value = \"16,16\";\n     return msg;\n} else {\n     msg.payload.value = \"16,16,16\";\n     return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":580,"wires":[["4a47b2ac.38a22c"]]},{"id":"ee1f2a20.03e478","type":"function","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"WC","func":"if  (msg.payload.state == \"1.0\") {\n     msg.payload.value = \"17\";\n     return msg;\n} else if \n    (msg.payload.state == \"2.0\") {\n     msg.payload.value = \"17,17\";\n     return msg;\n} else {\n     msg.payload.value = \"17,17,17\";\n     return msg;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":630,"y":620,"wires":[["4a47b2ac.38a22c"]]},{"id":"6b6ec088.76894","type":"api-call-service","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Aspiração off","server":"8d8136f8.6f7ef8","version":3,"debugenabled":false,"service_domain":"input_boolean","service":"turn_off","entityId":"input_boolean.aspirar_iniciar","data":"","dataType":"jsonata","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1310,"y":540,"wires":[["32cb9922.3b9436"]]},{"id":"3ab58380.4da0fc","type":"api-call-service","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Divisão = 0","server":"8d8136f8.6f7ef8","version":3,"debugenabled":true,"service_domain":"input_number","service":"set_value","entityId":"{{payload.entity_id}}","data":"{\"value\":0}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"all","x":990,"y":540,"wires":[["d2748058.b24fe"]]},{"id":"4a47b2ac.38a22c","type":"function","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Regroup","func":"return msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":820,"y":540,"wires":[["3ab58380.4da0fc"]]},{"id":"32cb9922.3b9436","type":"api-call-service","z":"a63c9be1.ee95e8","g":"cd8aadb2.eebf3","name":"Aspirar","server":"8d8136f8.6f7ef8","version":3,"debugenabled":false,"service_domain":"vacuum","service":"send_command","entityId":"vacuum.lucineide","data":"{  \"command\": \"app_segment_clean\",  \"params\": [    {{payload.value}}  ]}","dataType":"json","mergecontext":"","mustacheAltTags":false,"outputProperties":[],"queue":"none","x":1480,"y":540,"wires":[[]]},{"id":"8d8136f8.6f7ef8","type":"server","name":"Home Assistant","version":1,"legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]

ATTENTION:

  • Replace “vacuum.lucineide” with your vacuum entity;
  • Replace “camera.lucineide_map” with your camera map entity;
  • On node “Divisões”, there is a entity filter like “input_number.aspirar_”. This means that all your Input_Number Helpers should start with “aspirar_”. If you want to call them something else, just make sure all starts with the same prefix and change it in the node “Divisões”;
  • Check the node “Switch” from the second flow where I delegate each of my home divisions. Replace them with yours;
  • On all “function” nodes with my divisions, replace the Room ID with your room ID;

Hope you all like it.

Hello,
from my understanding, I can extract only tokens of devices added to Xiaomi app. But Roborock S7 is not found it the devices list and is not recognized by my Xiaomi app. Did I miss something? Is there a trick to do that? I can now control my vacuum just from Roborock app and (obviously) want to use HA. Ideas?

Yes it is found within devices on Xiaomi APP. Update you APP from store.

Do you mind sharing how to get or set status for Scrub Intensity? Referring to your second input_select list with ‘Close’ - i’m assuming this would be like in the app for Scrub intesity with options mild,moderate,intense, etc.

Something related to this feature request too.

I removed this configuration since then.
But you can have the same results using A different take on designing a Lovelace UI, all credits goes to this genius !

1 Like

Hi, can you use or not the mop direcly in HA. Because when i get the card for my S7 i didn’t get the button for the mop.

Thx

Out of curiosity, after integrating the Roborock S7 with Home Assistant, can you use the Home Assistant integration without the Roborock S7 needing a connection to the Cloud?

No, the Roborock integration with HA uses the cloud to access the vacuum robot.
Maybe, in the future, the integration can be implemented locally…

Thanks for the info!

Beautiful ! Could you please share how you did that ?

Im having an issue with adding s7 when i Already have added an s5. Just says no new devices in that account. Anyone know why?

@Ripper2909
super ! :heart_eyes:
Could you please share how you did that ?
Thaanks

Is this still the case? I noticed on the Xiaomi Miio integration page, it mentions the IoT class is local polling. There’s also an issue about HA communicating with the Roborock S7 across different subnets which leads me to believe the integration is communicating locally.

I don’t think so. Just check the integration setup page…

image

I’ve also checked with Wireshark and the integration is pooling the cloud…

Hi @MrFroggy

Like a lot of people, I’m ‘borrowing’ your dashboard images and config.
the reset timers? does that call service reset the timers on the Mi home app?
How did you do that?