denysdovhan / vacuum-card

Vacuum cleaner card for Home Assistant Lovelace UI
https://denysdovhan.com/smart-home
MIT License
914 stars 531 forks source link

I cant understand how the room cleaning scripts work.. #789

Open temtekmedia opened 2 months ago

temtekmedia commented 2 months ago

The documentations didnt help at all, im using xiaomi miio auto integration, I don't understand how the room cleaning scripts work.

Like on the card we have this:

shortcuts:

I'm trying to create even one succesfull room cleaning shortcut, The room is also named as "living room" in the mi home app.

so where is it calling this script.clean_living_room from? scripts.yaml? configuration.yaml? What do I have to write there and where do I have to write it, I'm confused and didnt find anything by searching. I'm trying all this for the first time

jianyu-li commented 2 months ago

The documentations didnt help at all, im using xiaomi miio auto integration, I don't understand how the room cleaning scripts work.

Like on the card we have this:

shortcuts:

  • name: Clean living room

    service: script.clean_living_room

    icon: 'mdi:sofa'

I'm trying to create even one succesfull room cleaning shortcut, The room is also named as "living room" in the mi home app.

so where is it calling this script.clean_living_room from? scripts.yaml? configuration.yaml? What do I have to write there and where do I have to write it, I'm confused and didnt find anything by searching. I'm trying all this for the first time

You have to create a script that vacuums a specific room then use that script name in the card. In my case, i have a roborock and have to use the "get maps" action to figure out what my room id was. then i created a script like this (where 19 was my living room id)

`alias: clean_living_room sequence:

temtekmedia commented 2 months ago

The documentations didnt help at all, im using xiaomi miio auto integration, I don't understand how the room cleaning scripts work. Like on the card we have this: shortcuts:

  • name: Clean living room service: script.clean_living_room icon: 'mdi:sofa'

I'm trying to create even one succesfull room cleaning shortcut, The room is also named as "living room" in the mi home app. so where is it calling this script.clean_living_room from? scripts.yaml? configuration.yaml? What do I have to write there and where do I have to write it, I'm confused and didnt find anything by searching. I'm trying all this for the first time

You have to create a script that vacuums a specific room then use that script name in the card. In my case, i have a roborock and have to use the "get maps" action to figure out what my room id was. then i created a script like this (where 19 was my living room id)

`alias: clean_living_room sequence:

* alias: Clean Living Room
  target:
  entity_id: vacuum.roborock_q8_max
  data:
  command: app_segment_clean
  params:
  - segments:
  - 19
  repeat: 1
  action: vacuum.send_command
  description: ""
  icon: mdi:sofa
  `

Thank you, however I have no idea how to even create scripts, JUST installed home assistant for the first time after being fed up with tuya app. I assume at the root folders "scripts.yaml" i would just copy paste this your code as an example if i would have indentical setup?

jianyu-li commented 2 months ago

The documentations didnt help at all, im using xiaomi miio auto integration, I don't understand how the room cleaning scripts work. Like on the card we have this: shortcuts:

  • name: Clean living room service: script.clean_living_room icon: 'mdi:sofa'

I'm trying to create even one succesfull room cleaning shortcut, The room is also named as "living room" in the mi home app. so where is it calling this script.clean_living_room from? scripts.yaml? configuration.yaml? What do I have to write there and where do I have to write it, I'm confused and didnt find anything by searching. I'm trying all this for the first time

You have to create a script that vacuums a specific room then use that script name in the card. In my case, i have a roborock and have to use the "get maps" action to figure out what my room id was. then i created a script like this (where 19 was my living room id) `alias: clean_living_room sequence:

* alias: Clean Living Room
  target:
  entity_id: vacuum.roborock_q8_max
  data:
  command: app_segment_clean
  params:
  - segments:
  - 19
  repeat: 1
  action: vacuum.send_command
  description: ""
  icon: mdi:sofa
  `

Thank you, however I have no idea how to even create scripts, JUST installed home assistant for the first time after being fed up with tuya app. I assume at the root folders "scripts.yaml" i would just copy paste this your code as an example if i would have indentical setup?

You can check the home assistant documentation on how to create scripts (which can be accessed through the UI under the Automations page)

temtekmedia commented 2 months ago

The documentations didnt help at all, im using xiaomi miio auto integration, I don't understand how the room cleaning scripts work. Like on the card we have this: shortcuts:

  • name: Clean living room service: script.clean_living_room icon: 'mdi:sofa'

I'm trying to create even one succesfull room cleaning shortcut, The room is also named as "living room" in the mi home app. so where is it calling this script.clean_living_room from? scripts.yaml? configuration.yaml? What do I have to write there and where do I have to write it, I'm confused and didnt find anything by searching. I'm trying all this for the first time

You have to create a script that vacuums a specific room then use that script name in the card. In my case, i have a roborock and have to use the "get maps" action to figure out what my room id was. then i created a script like this (where 19 was my living room id) `alias: clean_living_room sequence:

* alias: Clean Living Room
  target:
  entity_id: vacuum.roborock_q8_max
  data:
  command: app_segment_clean
  params:
  - segments:
  - 19
  repeat: 1
  action: vacuum.send_command
  description: ""
  icon: mdi:sofa
  `

Thank you, however I have no idea how to even create scripts, JUST installed home assistant for the first time after being fed up with tuya app. I assume at the root folders "scripts.yaml" i would just copy paste this your code as an example if i would have indentical setup?

You can check the home assistant documentation on how to create scripts (which can be accessed through the UI under the Automations page)

Thank you for the quick reply and help, It's a bit overwhelming in the beginning even tho I am a tech guy myself too but never really had any home automation, so it feels like a swamp. I'll probably have to figure out also a way to get the room id etc for my museum level xiaomi 1C vacuum mop

jianyu-li commented 2 months ago

I don't have a xiaomi myself so I can't help you with that, but maybe this documentation will help on getting the room id's

temtekmedia commented 2 months ago

I don't have a xiaomi myself so I can't help you with that, but maybe this documentation will help on getting the room id's

Great, thank you! I'm actually not using the official integration i couldnt get it to work with the card so I'm using xiaomi miio auto hacs integration

Checked through this https://github.com/al-one/hass-xiaomi-miot/blob/master/custom_components/xiaomi_miot/vacuum.py file and found that the "app_segment_clean" command atleast exists in both of these, I'm definately closer now will have to do some research this weekend :) Thank you again!

github-actions[bot] commented 1 week ago

There hasn't been any activity on this issue recently. This issue has now been marked as stale and will be closed if no further activity occurs. Please, update to the latest version and check if that solves the issue. Thank you for your contributions!