Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vacuum Addon - Room Cleaning #49

Open
Shoomaan opened this issue Jul 6, 2020 · 7 comments
Open

Vacuum Addon - Room Cleaning #49

Shoomaan opened this issue Jul 6, 2020 · 7 comments

Comments

@Shoomaan
Copy link

Shoomaan commented Jul 6, 2020

How is the room Cleaning working. not well documented. Am I right, that the name of the button, has to be the same of the room in valetudo? Is it working with the German letters ä, ü, ö?
I'm getting errors in valetudo when renaming the rooms. the possibility to use room numbers would be nice.

image

@dwainscheeren
Copy link
Owner

@Klumpke

@dimmuboy
Copy link

dimmuboy commented Jul 9, 2020

I have same problem, no special chars are used in room names but no action.
I have Valetudo RE 0.9.5.2

@Klumpke
Copy link

Klumpke commented Jul 11, 2020

I just pushed an update. #52
You now have a choice of 2 platforms (original and valetudo).

When you set original you can enter zone coordinates for your rooms.
For example:

data:
  vacuum: vacuum.rockrobo
  platform: original
  map: camera.rockrobo_map
  rooms:
    - room: Living Room
      zone: [20080,26771,23280,33121,1]
      icon: fal:couch

When you set up valetudo you can enter zone names for your rooms as entered in Valetudo.
For example:

data:
  vacuum: vacuum.rockrobo
  platform: valetudo
  map: camera.rockrobo_map
  rooms:
    - room: Living Room
      zone: living_room
      icon: fal:couch

@dimmuboy
Copy link

dimmuboy commented Jul 22, 2020

Zone cleaning is not same to room in Valetudo.
In my configuration for zones working

entity_id: vacuum.rockrobo
command: 'zoned_cleanup'
params:
  'zone_ids': ["Hallway Rooms"]

and for rooms

entity_id: vacuum.rockrobo
command: 'segmented_cleanup'
params:
  'segment_ids': ["Bathroom"]

@Klumpke
Copy link

Klumpke commented Jul 22, 2020

That's correct @dimmuboy.
That's why i created PR #52, but it's still not merged into the master branche.

@dimmuboy
Copy link

Better option was keep rooms and add zones too for me.
But I don't know how this configuration will works with Roborock without Valetudo.

image

- type: custom:dwains-flexbox-card
  items_classes: 'col-xs-12 col-sm-6 col-sm-6'
  cards:
  {% if (data | fromjson)['map'] %}
    - type: custom:dwains-flexbox-card
      padding: true
      cards:
        - !include
          - ../../../../views/partials/heading.yaml
          - title: Map
        - type: vertical-stack
          items_classes: 'col-sm-12'
          cards:
            - type: picture-entity
              entity: {{ (data | fromjson)['map'] }}
              show_name: false
              show_state: false
              tap_action: none
              hold_action: none
  {% endif %}

  {% if (data | fromjson)['rooms'] %}
    - type: custom:dwains-flexbox-card
      padding: true
      cards:
        - !include
          - ../../../../views/partials/heading.yaml
          - title: Rooms

      {% for rooms in (data | fromjson)['rooms'] %}
        - type: custom:button-card
          item_classes: 'col-xs-6'
          template: room_climate_info
          entity: input_boolean.dummy1
          name: {{ rooms.room }}
          icon: {{ rooms.icon }}
          show_state: false
          show_last_changed: false
          tap_action:
            action: call-service
            service: vacuum.send_command
          {% if (data | fromjson)['platform'] == "valetudo" %}
            service_data:
              entity_id: {{ (data | fromjson)['vacuum'] }}
              command: segmented_cleanup
              params:
                'segment_ids': ['{{ rooms.room }}']
          {% else %}
            service_data:
              entity_id: {{ (data | fromjson)['vacuum'] }}
              command: app_zoned_clean
              params: ['{{ rooms.room }}']
          {% endif %}
          styles:
            grid:
              - grid-template-areas: '"i n"'
            icon:
              - width: 25px
              - height: 25px
      {% endfor %}
  {% endif %}

  {% if (data | fromjson)['zones'] %}
        - !include
          - ../../../../views/partials/heading.yaml
          - title: Zones

      {% for zones in (data | fromjson)['zones'] %}
        - type: custom:button-card
          item_classes: 'col-xs-6'
          template: room_climate_info
          entity: input_boolean.dummy1
          name: {{ zones.zone }}
          icon: {{ zones.icon }}
          show_state: false
          show_last_changed: false
          tap_action:
            action: call-service
            service: vacuum.send_command
          {% if (data | fromjson)['platform'] == "valetudo" %}
            service_data:
              entity_id: {{ (data | fromjson)['vacuum'] }}
              command: zoned_cleanup
              params:
                'zone_ids': ['{{ zones.zone }}']
          {% else %}
            service_data:
              entity_id: {{ (data | fromjson)['vacuum'] }}
              command: app_zoned_clean
              params: ['{{ zones.zone }}']
          {% endif %}
          styles:
            grid:
              - grid-template-areas: '"i n"'
            icon:
              - width: 25px
              - height: 25px
      {% endfor %}
  {% endif %}

  {% if (data | fromjson)['controls'] %}
        - !include
          - ../../../../views/partials/heading.yaml
          - title: Control
        - type: glance
          item_classes: 'col-xs-12'
          style: |
            ha-card {
              border-radius: 5px;
              background-color: var(--dwains-theme-primary);
            }
          show_state: false
          entities:
          {% for controls in (data | fromjson)['controls'] %}
            - entity: input_boolean.dummy1
              name: {{ controls.name }}
              icon: {{ controls.icon }}
              tap_action:
                action: call-service
                service: {{ controls.service }}
                service_data:
                  entity_id: {{ (data | fromjson)['vacuum'] }}
          {% endfor %}
  {% endif %}

  {% if (data | fromjson)['sensors'] %}
        - !include
          - ../../../../views/partials/heading.yaml
          - title: Information
        - type: glance
          item_classes: 'col-xs-12'
          style: |
            ha-card {
              border-radius: 5px;
              background-color: var(--dwains-theme-primary);
            }
          entities:
          {% for sensors in (data | fromjson)['sensors'] %}
            - entity: {{ sensors.sensor }}
              name: {{ sensors.name }}
              icon: {{ sensors.icon }}
          {% endfor %}
  {% endif %}

@Klumpke
Copy link

Klumpke commented Jul 24, 2020

Oops, now I understand what you mean..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants