Select different template based on button selection

Removed due to jhbroch’s attitude and Admin’s refusal to remove his petty post.
Apparently helping out a guy twice and then getting berated by him over not helping him a third time because he feels entitled and can’t be bothered to get to know the basics of Home Assistant is fine here but reacting to it is not… so guess it’s my turn to be petty then.

Thx again to those who helped me out! It was much appreciated.

This sounds like an interesting setup! Maybe use 8 input booleans helper with your rooms, and a script that cleans the rooms based on input select values? I believe if you name them something like, room_clean_xxx or something else that is easy to script I guess, adding removing and renaming rooms should not be too painful

1 Like

First of all, you can’t use templates in a tap_action. So you will need to create a script, and then call the script. In the script you can use templates to clean only those rooms you want.

As suggested by @jeppesen you can indeed use input_booleans and name them smartly (eg input_boolen.clear_room_3 for the kitchen).

You could also use a mapping variable to map the input booleans to the rooms.

alias: Start vacuum based on input booleans
variables:
  mapper:
    - boolean: input_boolean.clean_living
      room: 1
    - boolean: input_boolean.clean_kitchen
      room: 3
sequence:
  - action: vacuum.send_command
    target:
      entity_id: vacuum.robovac_x10_pro_omni
    data:
      params:
        data:
          command: room_clean
          params:
            rooms: "{{ mapper | selectattr('boolean', 'is_state', 'on') | map(attribute='room') | list }}"
            map_id: 17
2 Likes

Hi, this is exactly the setup i want so i have a few questions as i am a bit of a novice.

  1. is the code you have there “variables:…” plus the input booleans all the code that is required?
  2. how did you figure out the room IDs?
  3. what is the map_id (and where did you find it?)
  4. what cleaning function does this select? as in is it just hoover, mop, hoover+mop?

any help appreciated!!

Great thanks for the info! Any chance you could share the code for your Eufy X10 dash design? Its almost identical to what i need and i can figure out the rest

Considering this is exactly what I’m looking for, I’m a novice, and people helped you by essentially giving you code - this is pretty unhelpful. I’ll figure it out myself but how hard would it have been to just copy and paste what you had.

The dash design is just a single button card pointing to the script and the button has the name Go Clean.

- type: button
  entity: script.your_script
  name: Go Clean

simmer down now

1 Like