Giter Site home page Giter Site logo

denysdovhan / vacuum-card Goto Github PK

View Code? Open in Web Editor NEW
846.0 15.0 518.0 4.27 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 Introduction

SWUbanner

Vacuum Card

npm version hacs GitHub Sponsors Patreon Buy Me A Coffee Twitter

Vacuum cleaner card for Home Assistant Lovelace UI

By default, Home Assistant does not provide any card for controlling vacuum cleaners. This card displays the state and allows to control your robot.

Preview of vacuum-card

Installing

💡 Tip: If you like this project, consider giving me a tip for the time I spent building this project:

Buy Me A Coffee

HACS

This card is available in HACS (Home Assistant Community Store).

Just search for Vacuum Card in plugins tab.

Manual

  1. Download vacuum-card.js file from the latest-release.

  2. Put vacuum-card.js file into your config/www folder.

  3. Add reference to vacuum-card.js in Lovelace. There's two way to do that:

    1. Using UI: ConfigurationLovelace DashboardsResources Tab → Click Plus button → Set Url as /local/vacuum-card.js → Set Resource type as JavaScript Module. Note: If you do not see the Resources Tab, you will need to enable Advanced Mode in your User Profile

    2. Using YAML: Add following code to lovelace section.

      resources:
        - url: /local/vacuum-card.js
          type: module
  4. Add custom:vacuum-card to Lovelace UI as any other card (using either editor or YAML configuration).

Usage

This card can be configured using Lovelace UI editor.

  1. In Lovelace UI, click 3 dots in top left corner.
  2. Click Configure UI.
  3. Click Plus button to add a new card.
  4. Find Custom: Vacuum Card in the list.
  5. Choose entity.
  6. Now you should see the preview of the card!

Sorry, no support for actions, shortcuts and stats in visual config yet.

Typical example of using this card in YAML config would look like this:

type: 'custom:vacuum-card'
entity: vacuum.vacuum_cleaner
actions:
  start:
    service: xiaomi_miio.vacuum_clean_segment
    service_data:
      entity_id: vacuum.vacuum_cleaner
      segments: [16, 20]
stats:
  default:
    - attribute: filter_left
      unit: hours
      subtitle: Filter
    - attribute: side_brush_left
      unit: hours
      subtitle: Side brush
    - attribute: main_brush_left
      unit: hours
      subtitle: Main brush
    - attribute: sensor_dirty_left
      unit: hours
      subtitle: Sensors
  cleaning:
    - entity_id: sensor.vacuum_main_brush_left
      value_template: '{{ (value | float(0) / 3600) | round(1) }}'
      subtitle: Main brush
      unit: hours
    - attribute: cleaning_time
      unit: minutes
      subtitle: Cleaning time
shortcuts:
  - name: Clean living room
    service: script.clean_living_room
    icon: 'mdi:sofa'
  - name: Clean bedroom
    service: script.clean_bedroom
    icon: 'mdi:bed-empty'
  - name: Clean kitchen
    service: script.clean_kitchen
    icon: 'mdi:silverware-fork-knife'

Here is what every option means:

Name Type Default Description
type string Required custom:vacuum-card
entity string Required An entity_id within the vacuum domain.
map string Optional An entity_id within the camera domain, for streaming live vacuum map.
map_refresh integer 5 Update interval for map camera in seconds
image string default Path to image of your vacuum cleaner. Better to have png or svg.
show_name boolean true Show friendly name of the vacuum.
show_status boolean true Show status of the vacuum.
show_toolbar boolean true Show toolbar with actions.
compact_view boolean false Compact view without image.
stats object Optional Custom per state stats for your vacuum cleaner
actions object Optional Override default actions behavior with service invocations.
shortcuts array Optional List of shortcuts shown at the right bottom part of the card with custom actions for your vacuum cleaner.

stats object

You can use any attribute of vacuum or even any entity by entity_id to display by stats section. You can also combine attribute with entity_id to extract an attribute value of specific entity:

Name Type Default Description
entity_id string Optional An entity_id with state, i.e. sensor.vacuum.
attribute string Optional Attribute name of the stat, i.e. filter_left.
value_template string Optional Jinja2 template returning a value. value variable represents the entity_id or attribute state.
unit string Optional Unit of measure, i.e. hours.
subtitle string Optional Friendly name of the stat, i.e. Filter.

actions object

You can defined service invocations to override default actions behavior. Available actions to override are start, pause, resume, stop, locate and return_to_base.

Name Type Default Description
service string Optional A service to call, i.e. script.clean_bedroom.
service_data object service_data for service call

shortcuts object

You can defined custom scripts for custom actions i.e cleaning specific room and add them to this card with shortcuts option.

Name Type Default Description
name string Optional Friendly name of the action, i.e. Clean bedroom.
service string Optional A service to call, i.e. script.clean_bedroom.
icon string Optional Any icon for action button.
service_data object service_data for service call

Theming

This card can be styled by changing the values of these CSS properties (globally or per-card via card-mod):

Variable Default value Description
--vc-background var(--ha-card-background, var(--card-background-color, white)) Background of the card
--vc-primary-text-color var(--primary-text-color) Vacuum name, stats values, etc
--vc-secondary-text-color var(--secondary-text-color) Status, stats units and titles, etc
--vc-icon-color var(--secondary-text-color) Colors of icons
--vc-toolbar-background var(--vc-background) Background of the toolbar
--vc-toolbar-text-color var(--secondary-text-color) Color of the toolbar texts
--vc-toolbar-icon-color var(--secondary-text-color) Color of the toolbar icons
--vc-divider-color var(--entities-divider-color, var(--divider-color)) Color of dividers
--vc-spacing 10px Paddings and margins inside the card

Styling via theme

Here is an example of customization via theme. Read more in the Frontend documentation.

my-custom-theme:
  vc-background: '#17A8F4'
  vc-spacing: 5px

Styling via card-mod

You can use card-mod to customize the card on per-card basis, like this:

type: 'custom:vacuum-card'
style: |
  ha-card {
    --vc-background: #17A8F4;
    --vc-spacing: 5px;
  }
  ...

Animations

I've added some animations for this card to make it alive. Animations are applied only for image property. Here's how they look like:

Cleaning Docking
Cleaning anumation Returning anumation

Supported languages

This card supports translations. Please, help to add more translations and improve existing ones. Here's a list of supported languages:

  • English
  • Українська (Ukrainian)
  • Deutsch (German)
  • Français (French)
  • Italiano (Italian)
  • Nederlands (Dutch)
  • Polski (Polish)
  • Русский (Russian)
  • Español (Spanish)
  • Čeština (Czech)
  • Magyar (Hungarian)
  • עִבְרִית (Hebrew)
  • Português (Portuguese)
  • Português Brasileiro (Brazilian Portuguese)
  • Svenska (Swedish)
  • Norsk bokmål (Norwegian)
  • Norsk nynorsk (Norwegian)
  • Dansk (Danish)
  • 한국어 (Korean)
  • Suomi (Finnish)
  • Català (Catalan)
  • 正體中文 (Traditional Chinese)
  • Việt Nam (Vietnamese)
  • Lietuvių (Lithuanian)
  • Română (Romanian)
  • 简体中文 (Simplified Chinese)
  • 日本語 (Japanese)
  • Your language?

Supported models

This card relies on basic vacuum services, like pause, start, stop, return_to_base, etc. It should work with any robot vacuum, however I can physically test it only with my own robot vacuum.

If this card works with your vacuum cleaner, please open a PR and your model to the list.

  • Roborock S8 (Ultra Pro), S7 (MaxV), S6 (MaxV, Pure), S5 (Max), S50, S4 (Max), E25, E4, Q5 Pro
  • Mijia Robot Vacuum Cleaner 1C (STYTJ01ZHM)
  • Xiaomi Mi Robot (STYJ02YM), Mi Robot 1S, Mi Roborock V1 (SDJQR02RR), Mijia 1C, Mi Robot Vacuum-Mop P, Robot Vacuum E10
  • Roomba 670, 675, 676, 960980, 981, i3, i7+, e5, S9, s9+, j7
  • Braava M6
  • Dyson 360 Eye
  • Neato D7, D6, D4
  • Shark IQ
  • Ecovacs Deebot 950, Deebot OZMO T8 AIVI, Deebot N79, Deebot N8, Deebot N8+, T9 AIVI, Deebot T20 Ombi
  • Eufy Robovac 30c, Robovac 15C Max, Robovac X8 Hybrid, Robovac G40
  • EcoVacs T9 AIVI
  • Dreame Z10 Pro, L10 Pro, D9, F9
  • 360 S7 Pro
  • KaBum! Smart 500
  • Honiture Q6 Lite
  • Neabot NoMo N1 Plus
  • Kyvol E31
  • Setti+ RV800
  • Your vacuum?

Development

Want to contribute to the project?

First of all, thanks! Check contributing guideline for more information.

Inspiration

This project is heavily inspired by:

  • MacBury Smart House — basically, this project is a refinement of MacBury's custom card.
  • Benji vacuum card — this is where I noticed this vacuum card design for the first time.

Huge thanks for their ideas and efforts 👍

License

MIT © Denys Dovhan

vacuum-card's People

Contributors

andriej avatar cschriel avatar denysdovhan avatar dependabot[bot] avatar drafteed avatar edenhaus avatar enzokot avatar fermartv avatar haruzept avatar hwikene avatar ibb-duha avatar jhesketh avatar kiskoza avatar krasnoukhov avatar krystiancharubin avatar lcerebo avatar rdspt avatar rhayun avatar rittsel avatar royto avatar seitan avatar semantic-release-bot avatar szafran81 avatar tamas-czirjak-epam avatar tarasifua avatar tzagim avatar vicfergar avatar vinteo avatar vlasin98 avatar xakepshilo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vacuum-card's Issues

Works for Neato D7

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

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!

Disable image

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

Thanks, awesome work!

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.

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

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!

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

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.

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

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?

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.

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]

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?

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

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.

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

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

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.

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!

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.

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

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

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

Display error

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

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

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!

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"]
}

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

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'

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)

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

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]

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).

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

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.

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

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!

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.

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.

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

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!

change word to my language ?

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

Thanks for the card - look really good.

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.

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.