Coder Social home page Coder Social logo

jurajnyiri / lovelace-valetudo-map-card Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hypfer/lovelace-valetudo-map-card

0.0 2.0 0.0 36 KB

Draws the map available from a Xiaomi Vacuum cleaner flashed with Valetudo in a Home Assistant Lovelace card

License: MIT License

JavaScript 100.00%

lovelace-valetudo-map-card's Introduction

Lovelace Valetudo Map Card

Draws the map available from a Xiaomi Vacuum cleaner flashed with Valetudo in a Home Assistant Lovelace card.

Configuration

lovelace.yaml:

resources:
  - type: js
    url: /community_plugin/lovelace-valetudo-map-card/valetudo-map-card.js

configuration.yaml:

sensor:
  - platform: rest
    resource: http://ip_of_your_vacuum/api/map/latest
    name: xiaomi_map
    json_attributes:
      - image
      - path
      - charger
      - robot
    value_template: 'OK'
    scan_interval: 5
    authentication: basic
    username: !secret xiaomi_map_username
    password: !secret xiaomi_map_password

authentication, username and password configuration variables are required if using Valetudo Password Authentication (undocumented). Otherwise, omit.

Card:

type: 'custom:valetudo-map-card'
entity: sensor.xiaomi_map
rotate: 0
crop:
  top: 0
  bottom: 0
  left: 0
  right: 0

Options

Name Type Default Description
type string Required custom:valetudo-map-card
entity string Required Sensor to get state from
floor_color string '--valetudo-map-floor-color', '--secondary-background-color' Floor color
obstacle_weak_color string '--valetudo-map-obstacle-weak-color', '--divider-color' Weak obstacle color
obstacle_strong_color string '--valetudo-map-obstacle-strong-color', '--accent-color' Strong obstacle color
path_color string '--valetudo-map-path-color', '--primary-text-color' Path color
show_dock boolean true Draw the charging dock on the map
show_vacuum boolean true Draw the vacuum on the map
show_path boolean true Draw the path the vacuum took
dock_icon string mdi:flash The icon to use for the charging dock
vacuum_icon string mdi:robot-vacuum The icon to use for the vacuum
map_scale number 1 Scale the map by this value
icon_scale number 1 Scale the icons (vacuum & dock) by this value
rotate number 0 Value to rotate the map by (default is in deg, but a value like 2rad is valid too)
crop Object {top: 0, bottom: 0, left: 0, right: 0} Crop the map

lovelace-valetudo-map-card's People

Contributors

bbbenji avatar jurajnyiri avatar thelastproject avatar

Watchers

 avatar  avatar

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.