Giter Site home page Giter Site logo

denysdovhan / vacuum-card Goto Github PK

View Code? Open in Web Editor NEW
854.0 17.0 523.0 3.79 MB

Vacuum cleaner card for Home Assistant Lovelace UI

Home Page: https://denysdovhan.com/smart-home

License: MIT License

JavaScript 5.36% CSS 15.89% Shell 0.18% TypeScript 78.58%
home-assistant homeassistant hass lovelace custom-cards vacuum robot-vacuum hacs

vacuum-card's Issues

Display error

Vacuum have error state and error attribute with the message of the error. We should display that error.

Buttons for a manual control

I have created the following buttons for manual control

      actions:
        - name: Manual control
          icon: mdi:google-controller
          service: xiaomi_miio.vacuum_remote_control_start
          service_data:
            entity_id: vacuum.miio
        - name: Left turn
          icon: mdi:rotate-left
          service: xiaomi_miio.vacuum_remote_control_move
          service_data:
            entity_id: vacuum.miio
            rotation: 30
            velocity: 0.0
            duration: 1000
        - name: Back
          icon: mdi:arrow-down-bold
          service: xiaomi_miio.vacuum_remote_control_move
          service_data:
            entity_id: vacuum.miio
            velocity: -0.29
            duration: 1000
        - name: Forward
          icon: mdi:arrow-up-bold
          service: xiaomi_miio.vacuum_remote_control_move
          service_data:
            entity_id: vacuum.miio
            velocity: 0.29
            duration: 1000
        - name: Right turn
          icon: mdi:rotate-right
          service: xiaomi_miio.vacuum_remote_control_move
          service_data:
            entity_id: vacuum.miio
            rotation: -30
            velocity: 0.0
            duration: 1000
        - name: Stop manual control
          icon: mdi:google-controller-off
          service: xiaomi_miio.vacuum_remote_control_stop
          service_data:
            entity_id: vacuum.miio

But these buttons gone after starting the manual control.
Please integrate them to the UI or add a persistent flag for action buttons.

select map

option for select map.

multi floor is now available for some robots (mine s5max roborock) it auto detect the floor it is on (ex. map2), but when returning to the dock it dont choose the map where the dock is.(map1)

1Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Custom start / clean command or ability to hide the actions row

Is your feature request related to a problem? Please describe.

I have a set of input toggles used for choosing the rooms I wish to clean, these then get passed to a script and are used for custom cleaning routines. It is very rare that I do a complete 'clean'. Some more flexibility in the actions row would be useful.

Describe the solution you'd like

It would be nice to have a little more control over the start/clean button or the ability to hide it.

Describe alternatives you've considered

Right now I will probably use a row of custom buttons instead.

Additional context

Custom script can be seen here: https://github.com/scottsweb/ham/blob/master/homeassistant/python_scripts/monk.py

Missing values in card

The card is displaying but is missing all of the sensor values. I've included a screenshot below. Installed in www folder and don't see any errors in my console.

Expecting the values to display in Filter, Side Brush, Main Brush, etc.

Screen Shot 2020-05-06 at 8 27 17 PM

Screen Shot 2020-05-06 at 8 30 17 PM

  • Release: 0.3.2
  • Browser: Tested in Chrome, Opera, and Safari
  • HomeAssistant version: 0.109.4

Add Valetudo map

Describe the solution you'd like
i'm using Valetudo and I'd like to add the map instead the of vacuum image the map generated by 'custom:valetudo-map-card' so the card will show this map, this map is generated by a sensor
the sensor:
sensor:

  • platform: mqtt
    state_topic: "valetudo/rockrobo/state"
    json_attributes_topic: "valetudo/rockrobo/map_data"
    name: xiaomi_map
    value_template: 'OK'

Use custom entities as sensor objects

Is your feature request related to a problem? Please describe.
This card currently allows for custom stats to be displayed, such as the lifetime of certain parts of the robot. However, this only works for attributes of the vacuum itself, not separate stat entities.

Describe the solution you'd like
I'd like to be able to use any arbitrary entity I have in Hass already to be displayed on the card. I currently use a template vacuum with my Shark Ion Robot, which means I can't add these stats as attributes, but only as template sensors.

Describe alternatives you've considered
As far as I'm aware, there's no way to add attributes to a template vacuum, so there is no way to get them on this card. Right now, I just have a vertical stack with a set of conditional cards on the bottom that shows these stats, but it looks messy compared to the original card.

Additional context
My card right now

change word to my language ?

How do I change the word 'continue' - 'charging' - 'ilde' to my language ?

Thanks for the card - look really good.

Support rest980 roomba

Hi, Is it possible to make the card compatible with ha-rest980-roomba?
I think is the best and most complete integratation of iRobot Roombas for Home Assistant.

And your card i sso awesome!

Card does is not selectable in Lovelace

Cant seem to use this card in my installation.

Installed it with HACS, verified that it was installed and loaded under Lovelace resources. But when trying to add it in Lovelace, tells me cant find the card, also card itself is not selectable in lovelace UI.

Show the name

This is a great plugin, but it doesn't display the name of the vacuum. I have four RoboRock S6 (you can add this model to the list btw, it works great) and I have no idea which card is for which vacuum unless I click on them. Being able to see the name of the vacuum is pretty essential for anyone with more than one vacuum.

Be able to set 'number of cleanups' before running the vacuum

Hi!

Is your feature request related to a problem? Please describe.
I used another custom card for vacuum cleaner and I'm just lacking this functionality here :)

Describe the solution you'd like
I'd like to be able to simply set desired number of times that vacuum should clean specified area or do a complete cleaning. As I don't need 'play' and 'locate' buttons at all it could be simply another button like that – just a digit that would change "on-tap" from 1 to 3.

Describe alternatives you've considered
A dropdown in the 'preview' section. Probably it would be best to have it next to "mode" (e.g. Standard) setting.
BTW, it would be really nice to be able to set the cleanup mode from there also.

Additional context
This is the card that I was using recently: https://github.com/PiotrMachowski/lovelace-xiaomi-vacuum-map-card
Right now I use both of those cards (yours ant this one), both in one custom swipe-card.

Thanks!

Option to hide buttons

Hi!
Awesome card!

Would be nice to have an option to hide and/or customize the bottom left buttons "Clean" and "Locate vacuum".

Also an option to show the mapstream only when cleaning would be neat!

Blank card - TypeError indexOf undefined

Before submitting a bug

  • I updated to the latest version available
  • I cleared the cache of my browser

Describe the bug

Card does not show up when on dashboard or when configuring. Neato Botvac D5 Connected that I'm able to control via the default entity/device created by the Neato integration.

Steps to reproduce

  1. Add card to dashboard following instructions
  2. Configure card in UI
  3. Save Card
  4. Nothing shows up

Expected behavior
Expected the card to show vacuum status, etc.

Screenshots
Configurator
Blank card in edit dashboard mode
Blank card in view dashboard mode

Error in the Chrome console:
Screen Shot 2020-05-07 at 12 59 31 PM

vacuum-card.js:454 Uncaught (in promise) TypeError: Cannot read property 'indexOf' of undefined
    at HTMLElement.renderSource (vacuum-card.js:454)
    at HTMLElement.render (vacuum-card.js:586)
    at HTMLElement.update (vacuum-card.js:159)
    at HTMLElement.performUpdate (vacuum-card.js:134)
    at HTMLElement._enqueueUpdate (vacuum-card.js:134)

In Firefox the console error is similar:

TypeError: e is undefined vacuum-card.js:454:39165

Versions:

  • Release: 0.3.4 (tried with all released versions though)
  • Browser: chrome and firefox
  • HomeAssistant version: 0.109.4

Disable image

Is there a way to disable the image to make the card more compact?

Thanks, awesome work!

Add translations

Is your feature request related to a problem? Please describe.
It would be nice if card could benefit from translated strings regarding brushes etc.

Additional context
If not possible to get value automatically, would be nice to let users help translate.

Support for iRobot Roomba e5

Roomba e5 is fairly dumb and has no exposed sensors other than battery and bin status.

vacuum.pani_hudsonova

battery_level: 100
battery_icon: mdi:battery-charging-100
software_version: 3.4.59+92
status: Charging
bin_present: true
bin_full: false
friendly_name: Paní Hudsonová
supported_features: 13276

The card does not render as it fails on getting those attributes. https://github.com/denysdovhan/vacuum-card/blob/master/src/vacuum-card.js#L116-L152

Ideally all the attributes would be rendered conditionally, but I understand that would be a lot of error. In the mean time I will fork the repo and trim everything not supported on e5.

Works for Neato D7

Just wanted you to know that this works great for my Neato Robotic Vacuum.

Add @macbury as a contributor

Hi @macbury 👋

This project is heavily inspired by your custom card for the vacuum cleaner. I refactored it a bit and added some minor features.

I believe this might be useful for you as well. I also invited you to contribute to this project (please, check your email).

No blue "overlay"

Can we please have an option to when you usea custom background picture it go all the way to the border and DONT have that blue tinged overlay on the whole picture.
image

Other than that its a sweet card

UI Helper formatting issue in 0.112b0

Before submitting a bug

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Describe the bug

When attempting to edit the card in 0.112b0 the UI is mangled.

Steps to reproduce

  1. Edit Card from UI

Expected behavior
Non-mangled UI

Screenshots
image

Versions:

  • Release: 1.6.0
  • Browser: Chrome
  • HomeAssistant version: 0.112b0

Live map camera loads CPU

Hello everyone!

I have a problem with displaying live map using this integration.
Everything works, but Chrome tab (on my PC) with this lovelace card starts to load CPU to 60-80% when using map camera (from Valetudo via MQTT).
And it also loads RPi CPU to 10% (instead of 2-3% at normal working)

When I remove parameter map: camera.rockrobo_map - problem disappears.
I have picture-entity card with the same camera entity - no problems, only live map within this custom card.

Using Chrome dev tools I've discovered that this custom card makes new requests for camera image approximately every 5-10 milliseconds infinitely (about 150 requests per second, and it can be more often, depends on CPU performance I think). And this process loads CPU.

Any suggestions to fix it?

Originally posted by @vaproloff in #33 (comment)

Image Animations not working

Tried on Chrome and Safari for Mac and Chrome for Android. Also tried with default image and custom image. No animation is visible on the entity image while the vacuum is cleaning as shown in the Readme.

HACS warning

Before submitting a bug

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Describe the bug

Please check screenshots

Steps to reproduce

  1. Go to HACS in interface
  2. See Warning message
  3. Try to reinstall module -> warning in log

Screenshots
image
image

Versions:

  • Release: 1.4.2
  • Browser: Chrome
  • HomeAssistant version: 0.110.5
  • HACS version: 1.1.0

Actions scripts - are these magically created?

The readme mentions that the actions config requires a service value in the form of: service: script.clean_living_room.

What is not clear, is how someone is to create these script files. I presume that the user has to create these, so it would be nice to provide some hints/links to the user on how to create these files.

Better support for themes

Is your feature request related to a problem? Please describe.
The card is coded to use a specific color variable for the main background that doesn't transfer well between themes

Describe the solution you'd like
Maybe choose a different color variable

Describe alternatives you've considered
I'll try changing the variable within the vacuum-card.js to match the color variable used in the majority of themes I pulled from HACS

Additional context
The card looks really nice!

Options to remove hours data

Thanks for the great card!
It works with my iRobot S7+ very well.
The only issue I met with is that there is no data shown for those filters, brush, or sensor.
Is this normal?
If this can't be fixed easily, is there any option to just hide that section and leave the rest parts (battery status, vacuum image, and command icons) available?

Thank you!

Buttons not updating

Before submitting a bug

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Describe the bug

Card buttons don't updated as state changes. I can see the state change on the card (e.g. "cleaning") but there is only a start and locate button. Clicking on start just restarts the vacuum. I understand, based on the code, that there should be a pause and return to home button as well. These functions work on the actual entity screen provided by Home Assistant.

Steps to reproduce

  1. Add widget with stock config (no actions, no customization)
  2. Click start
  3. Vacuum starts but cannot be stopped by the widget as the buttons never update

Expected behavior
The buttons update

Versions:

  • Release: 1.6.0
  • Browser: Firefox and mobile app
  • HomeAssistant version: 0.114.3

Action icons have disappeared

Before submitting a bug

Yes I updated to the latest version available
Yes I cleared the cache of my browser

I have just installed the latest version of this card and I have updated HA to 0.110. However the action icons have disappeared but the actions are still clickable and execute the script etc.

Please see the screenshot below from my mobile.

Screenshot_20200520-130129_Home Assistant

I am using official HA Android app on my android. This problem persists on my Windows computer on chrome. I have cleared the cache but the issue remains.

Thanks.

Make the location icon optional

Hi,

when you active the show_toolbar the card generates an icon for the "locate" command. It would be nice if this icon is optional.

Valetudo gen1 support

Is your feature request related to a problem? Please describe.
when using this card with valetudo gen1, the attributes do not correctly show the data

Describe the solution you'd like
valetudo attributes such as mainBrush, sensor etc are named slightly different then in this card

Describe alternatives you've considered
I have manually updated the file locally to support valetudo naming, would need to use some good switch to know which device and hence which attribute naming to use

Additional context
here is example of my valetudo attributes:

{
    "mainBrush": "103.4",
    "sideBrush": "3.4",
    "filter": "103.6",
    "sensor": "28.7",
    "cleanTime": "196.2",
    "cleanArea": "11859.0",
    "cleanCount": 570,
    "last_run_stats": {
        "startTime": 1588800816000,
        "endTime": 1588801930000,
        "duration": 1114,
        "area": "15.0",
        "errorCode": 0,
        "errorDescription": "No error",
        "finishedFlag": true
    },
    "state": "docked",
    "valetudo_state": "CHARGING",
    "zoneStatus": ["bedroom"]
}

Card is not displayed

Done everything as on the Manual. No idea why the card is not showing up.

  1. Downloaded and referenced the vacuum-card.js file at the top of my ui-lovelace.yaml file
    image
  2. Used the configuration from the example replacing the entity to the one I have (I'm using the mi.hihi platform for that)
    image

But no matter what I try I keep getting a blank page. Im new to Lovelace, am I missing something?
image

Thank you!

No translation on card?

Before submitting a bug

[X] I updated to the latest version available
[X] I cleared the cache of my browser

Describe the bug

On latest version there's still lack of translation on the card:
image
"Charging" should be translated according to this version (polish language)

Versions:

  • Release: v1.1.0
  • Browser: Chrome
  • HomeAssistant version: 0.109.6

No sensor data

Before submitting a bug

[ x] I updated to the latest version available
[ x] I cleared the cache of my browser

Describe the bug
The card doesn't show my sensor data at all. I was playing with toggles in the card configuration but with no success. Could the negative value for one of the sensors be the cause?

Screenshots
obraz
obraz

Versions:

  • Release: [e.g. 1.6.0]
  • Browser: [firefox]
  • HomeAssistant version: [0.114.3]

Support for different vacuum images

Is your feature request related to a problem? Please describe.
Now only a single vacuum model image is "hardcoded" into the card.

Describe the solution you'd like
It would be great to have images of several most popular models (possibly, at least confirmed supported ones) so that this image would be configurable.

Describe alternatives you've considered
Possible solutions are:

  • bundle (most popular) model images into the repo and have a parameter that chooses one
  • have default image as is and expose the parameter to provide own image file

Additional context
N/A

Support for Deebot 600 series

Great card!

The cards works with my Deebot 600 series. But no information on the sensors. The Deebot is pretty straight forward. And have the following items:

fan_speed_list:

  • normal
  • high
    status: auto
    battery_level: 89
    battery_icon: 'mdi:battery-90'
    fan_speed: normal
    error: null
    component_main_brush: 26513
    component_side_brush: 11513
    component_filter: 8513
    clean_mode: auto
    friendly_name: Moppie
    supported_features: 10239

Can this one be supported as well?

Ability to remove sensors

First, you can add the iRobot Braava Jet M6 to the list of supported devices. It works, but there is obviously no reason to have the filter or brush sensors for a robot mop, so it would be nice to be able to hide them.

Card broken in ha 110.b4

Before submitting a bug

[X] I updated to the latest version available
[X] I cleared the cache of my browser

Describe the bug

All the icons are broken in ha 110.b4, well actually the buttons stop work but the icons are visible this is due to some large icon changes in 110.

You can see how your was fixed in this order custom card.
artem-sedykh/mini-humidifier@a540e6f

Versions:

  • Release: latest
  • Browser: Chrome
  • HomeAssistant version: 0.110.b4

Ability to translate the noise mode

Is your feature request related to a problem? Please describe.
Currently, it is not possible to translate the "noise mode" values

Describe the solution you'd like
Add mode translation available

Additional context
image

Card shows up as a blank space

Before submitting a bug

[X] I updated to the latest version available
[X] I cleared the cache of my browser

Describe the bug

Using a mqtt vacuum in state mode, this card shows up as a blank space. Nothing about the card shows up in the logs either.

Steps to reproduce

  1. Follow YAML installation options.
  2. Add the following to HA
- entity: vacuum.roomba_780
  type: 'custom:vacuum-card'

This also happens if I purposely put in an invalid vacuum entity.

Expected behavior
I expected something to show up, even if it isn't able to control the vacuum.

Screenshots
My current roomba setup to show you the blank area that is created.
Disabled:
disabled
Enabled:
enabled

Versions:

  • Release: [0.3.2]
  • Browser: [chrome & firefox]
  • HomeAssistant version: [0.109.4]

Information regarding stats attributes available and fan speed.

Hello there, first of all, great job on this implementation.

I have two Roomba's, one i7 and one 980. Both are integrated in my HA already.
With the vacuum-card I can perform stop/start/home on both robots, see the square-meter covered and the cleaning time. I can't see any stats like hours on the filters, etc. I imagine this is because my stats are not available, would you please explain what I need to do in order to be able to see what are the stats I can use on these robots?

Also, my 980 shows me selection for fan speed. The I7 does not. Any reason that should be the case?

HA can't correctly load custom card after locating JS file

Before submitting a bug

[X ] I updated to the latest version available
[X ] I cleared the cache of my browser

Describe the bug

When I add to Resources using the UI (not yaml), HA logs show:

2020-05-31 16:10:29 ERROR (MainThread) [frontend.js.latest.202005195] http://192.168.0.107:8123/config/lovelace/resources:0:0 Uncaught TypeError: Failed to resolve module specifier "lit-element". Relative references must start with either "/", "./", or "../".

So I edit the .js file to have the "./" suffix. Then a new error occurs:

2020-05-31 16:12:30 ERROR (MainThread) [frontend.js.latest.202005195] http://192.168.0.107:8123/config/lovelace/resources:0:0 Uncaught TypeError: Failed to resolve module specifier "custom-card-helpers". Relative references must start with either "/", "./", or "../".

So I add "./" to that. Then no more HA log errors show up but them when I try to add a manual card with

type: 'custom:vacuum-card'
entity: vacuum.vacuum_cleaner

in the Card Configuration I get Error: Custom element not found: vacuum-card as well as

Custom element doesn't exist: vacuum-card.
type: 'custom:vacuum-card'
entity: vacuum.vacuum_cleaner

Steps to reproduce

See above.

Expected behavior
I should see the card preview.

Screenshots
Chrome screenshot after adding the "./" to the lit-element and custom-card-helpers path. vacuum-card.js is the only file in my config/www folder.
image
Firefox screenshot:
image

Versions:

  • Release: latest commit on master
  • Browser: Both Chrome and Firefox on Windows, with and without Private Mode.
  • HomeAssistant version: 0.110.4

Map Camera

Hi
hat do I have to enter in map camera? Can you give an example?
It is a dropdown box. but when I click on it, there is no selection.

thank you

BR
Stibe

State translations now work with standard states

Before submitting a bug

[x] I updated to the latest version available
[x] I cleared the cache of my browser

Describe the bug

State translations now work with standard states.
In french, states are not translated.

Steps to reproduce

  1. Compare vacuum-card with home assistant default display

Expected behavior

Have same translation on vacuum card than home assistant

Screenshots
idle
cleaning

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.