Coder Social home page Coder Social logo

`undefined is not an object (evaluating 'i.id.toString')` when using `template: vacuum_goto_predefined` about lovelace-xiaomi-vacuum-map-card HOT 4 OPEN

wrobelda avatar wrobelda commented on September 13, 2024
`undefined is not an object (evaluating 'i.id.toString')` when using `template: vacuum_goto_predefined`

from lovelace-xiaomi-vacuum-map-card.

Comments (4)

wrobelda avatar wrobelda commented on September 13, 2024

The Valetudo RE manual is equally confusing: there's id attribute, but the position one is missing: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card/blob/master/docs/templates/rand256ValetudoRe.md#going-to-a-predefined-point-vacuum_goto_predefined

from lovelace-xiaomi-vacuum-map-card.

PiotrMachowski avatar PiotrMachowski commented on September 13, 2024

Use the following config:

  - template: vacuum_goto_predefined
    selection_type: PREDEFINED_POINT
    predefined_selections:
      - id: 1
        position:
          - 2638
          - 2533
        icon:
          name: mdi:delete-empty
          x: 2638
          'y': 2533
        label:
          text: Emptying
          x: 2638
          'y': 2533
          offset_y: 35

from lovelace-xiaomi-vacuum-map-card.

wrobelda avatar wrobelda commented on September 13, 2024

Still no go. The service call now is:

{
  "domain": "mqtt",
  "service": "publish",
  "serviceData": {
    "topic": "valetudo/BlindHarmlessChimpanzee/GoToLocationCapability/go/set",
    "payload": "{ \"coordinates\": { \"x\": \"2638\", \"y\": \"2533\" } }"
  }
}

Comparing it to a "Pin & Go" call, the only difference is that the coordinates are sent as strings vs integers in the latter.

from lovelace-xiaomi-vacuum-map-card.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.