Please help - Shark Vacuum Room cleaning based floorplan

Thanks for the reply, I finally got it working the way I wanted.

OK, this “simple” thing required a bit of work.
I had to create a helper and use a script below.

The lovelace tap_actions do not support multiple actions for some reason.
I used the script referenced below for multiple actions.

I created a helper, input_text.cleaning_living_area, which I set to the room to clean. For example, den or dining.
I created an automation to reset the input_text.cleaning_living_area to “done” when the vacuum state changes from cleaning to docked

Below is yaml to support room cleaning:

                - element: shark.clean_den
                  entity:
                    - input_text.cleaning_living_area
                  tap_action:
                    action: call-service
                    service: script.multi_tap_action
                    service_data:
                      actions:
                        - service: sharkiq.clean_room
                          entity_id: vacuum.kitchen
                          data:
                            rooms: Den
                        - service: input_text.set_value
                          entity_id: input_text.cleaning_living_area
                          data:
                            value: den
                    target: {}
                  state_action:
                    service: floorplan.class_set
                    service_data: |
                      >  
                        if (entity.state === "den")  return "spinning-vacuum";   
                        else return "";

                - element: shark.clean_dining
                  entity:
                    - input_text.cleaning_living_area
                  tap_action:
                    action: call-service
                    service: script.multi_tap_action
                    service_data:
                      actions:
                        - service: sharkiq.clean_room
                          entity_id: vacuum.kitchen
                          data:
                            rooms: Dining Room
                        - service: input_text.set_value
                          entity_id: input_text.cleaning_living_area
                          data:
                            value: dining
                    target: {}
1 Like