denysdovhan / vacuum-card

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

Custom start / clean command or ability to hide the actions row #91

Closed scottsweb closed 11 months ago

scottsweb commented 4 years ago

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

I have a set of input toggles used for choosing the rooms I wish to clean, these then get passed to a script and are used for custom cleaning routines. It is very rare that I do a complete 'clean'. Some more flexibility in the actions row would be useful.

Describe the solution you'd like

It would be nice to have a little more control over the start/clean button or the ability to hide it.

Describe alternatives you've considered

Right now I will probably use a row of custom buttons instead.

Additional context

Custom script can be seen here: https://github.com/scottsweb/ham/blob/master/homeassistant/python_scripts/monk.py

fi-sch commented 4 years ago

+1 for that :)

krystiancharubin commented 3 years ago

You can define a custom action that will run your script. It would be segment clean just like you can do in the app.

scottsweb commented 3 years ago

I ended up using CSS to make something that looked like this:

Screenshot 2020-08-25 at 14 32 35

The goal being to remove the default play/clean action as I always want people to be selective about the rooms that are cleaned. It works ok.

gytisgreitai commented 3 years ago

@scottsweb can you post the full code for newbies like me? I'm looking for something similar

scottsweb commented 3 years ago

@gytisgreitai you can find the UI config here: https://github.com/scottsweb/ham/blob/master/homeassistant/ui-lovelace.yaml#L543, my repo has other things you may find useful too: https://github.com/scottsweb/ham/tree/master/homeassistant

denysdovhan commented 3 years ago

I'll be grateful if someone could try to make a PR. Unfortunately, I don't have time to work on that feature.

palengh commented 3 years ago

Here is my setup, using custom scripts. I added the scripts to the custom buttons using these lines in the card config.

actions:
  - name: Kitchen table
    service: script.vacuum_under_kitchen_table
    icon: 'mdi:table-chair'
Skjermbilde 2020-09-23 kl  11 08 13

I have also a script that moves the vacuum to a starting point (silently moving without fan running) before starting to clean the entire house. I then make sure it starts in a spot of the house that we use the most; the kitchen, then it moves to the living room performing its standard clean all house program.

script:
  vacuum_under_kitchen_table:
    alias: "Vacuum under the kitchen table"
    sequence:
      - service: vacuum.send_command
        data:
          entity_id: vacuum.albertinne
          command: app_goto_target
          params: [40300,26200]
      - delay: '00:00:30'     # Wait untill starting moving (not Idle)
      - wait_template: "{{ is_state('vacuum.albertinne', 'idle') }}"
      - service: vacuum.send_command
        data:
          entity_id: vacuum.albertinne
          command: app_zoned_clean
          params: [[40300,24400,43000,26200,1]]
      - service: notify.adults
        data:
          title: chezENGH smarthouse
          message: 'Albertinne started to clean under the kitchen table at {{now().strftime("%H:%M")}}'
github-actions[bot] commented 1 year 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!

github-actions[bot] commented 11 months ago

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.