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

Distance is incorrectly calculated for Hypfer/Valetudo #482

Closed
3 tasks done
tenfire opened this issue Sep 20, 2022 · 2 comments
Closed
3 tasks done

Distance is incorrectly calculated for Hypfer/Valetudo #482

tenfire opened this issue Sep 20, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@tenfire
Copy link

tenfire commented Sep 20, 2022

Checklist

  • I have updated the card to the latest version available
  • I have cleared the cache of my browser
  • I have checked if the problem is already reported

The problem

Unlike other platforms, the map coordinates for Valetudo is in centimeters instead of millimeters. This results in incorrect distances shown above the rectangle when drawing a custom zone to clean. Not a huge problem and something that I can live with, but thought I should report it anyway.

What version of a card has described problem?

v2.1.2

What was the last working version card?

No response

What vacuum model do you have problems with?

roborock s5 and dreame z10 pro

Which integration do you use to control your vacuum (link)?

https://github.com/Hypfer/Valetudo

What browser (browsers/apps) does have this problem?

Brave

What version of Home Assistant do you use?

2022.8.0

What type of installation are you running?

Home Assistant Container

Card's configuration

type: custom:xiaomi-vacuum-map-card
style: |
  ha-card {
    opacity: 0.8;
  }
title: Dreame
entity: vacuum.robot2
vacuum_platform: Hypfer/Valetudo
map_source:
  camera: camera.robot_2_rendered_map
  crop:
    top: 224
calibration_source:
  calibration_points:
    - vacuum:
        x: 3300
        'y': 3375
      map:
        x: 356
        'y': 540
    - vacuum:
        x: 3615
        'y': 3375
      map:
        x: 607
        'y': 540
    - vacuum:
        x: 3615
        'y': 3735
      map:
        x: 607
        'y': 827
map_locked: true
two_finger_pan: false
internal_variables:
  topic: valetudo/robot2
map_modes:
  - name: Rum
    icon: mdi:floor-plan
    run_immediately: false
    coordinates_rounding: true
    selection_type: ROOM
    max_selections: 999
    repeats_type: EXTERNAL
    max_repeats: 4
    service_call_schema:
      service: mqtt.publish
      service_data:
        topic: '[[topic]]/MapSegmentationCapability/clean/set'
        payload: >-
          {"segment_ids": [[selection]], "iterations": [[repeats]],
          "customOrder": true}
    predefined_selections:
      - id: '3'
        outline:
          - - 3300
            - 3375
          - - 3615
            - 3375
          - - 3615
            - 3735
          - - 3300
            - 3735
        label:
          text: Sovrum
          x: 3460
          'y': 3535
          offset_y: 35
        icon:
          name: mdi:bed
          x: 3460
          'y': 3535
    variables:
      p: valetudo/robot
  - template: vacuum_clean_zone
    name: Valfri zon
    max_selections: 1
    max_repeats: 4

Javascript errors shown in the browser's console (if applicable)

No response

Additional information

No response

@tenfire tenfire added the bug Something isn't working label Sep 20, 2022
@PiotrMachowski
Copy link
Owner

Thanks, I'll check it out 👍

@PiotrMachowski
Copy link
Owner

Done in v2.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants