lovelace-xiaomi-vacuum-card icon indicating copy to clipboard operation
lovelace-xiaomi-vacuum-card copied to clipboard

New Viomi vendor or broken attributes?

Open igorsantos07 opened this issue 1 year ago • 0 comments

Hello there!

I got a Viomi V7 and it seems his sensors do not show up on the card. However, when I was going to submit a PR to fix it, I understand.... it should show?

image

I see the original attribute values are the same as my vacuum show (except for "sensor", which I don't understand which corresponding attribute it should be in my case), unless I understood something wrong?

// from xiaomi-vacuum-card.js:24
    const attributes = {
        main_brush: {
            key: 'main_brush_left',
            label: 'Main Brush: ',
            unit: ' h',
        },
        side_brush: {
            key: 'side_brush_left',
            label: 'Side Brush: ',
            unit: ' h',
        },
        filter: {
            key: 'filter_left',
            label: 'Filter: ',
            unit: ' h',
        },
        sensor: {
            key: 'sensor_dirty_left',
            label: 'Sensor: ',
            unit: ' h',
        },
    };
# from my vacuum entity
fan_speed_list:
  - Silent
  - Standard
  - Medium
  - Turbo
battery_level: 100
battery_icon: mdi:battery-charging-100
fan_speed: Turbo
do_not_disturb: 'on'
do_not_disturb_start: '23:00:00'
do_not_disturb_end: '10:00:00'
cleaning_time: 0
cleaned_area: 0
main_brush_left: 326
side_brush_left: 146
mop_left: 178
filter_left: 146
status: docked
mop_attached: false
friendly_name: R2-D2
supported_features: 13180

Adding a custom attribute works, though:

type: custom:xiaomi-vacuum-card
entity: vacuum.r2d2
attributes:
  sensor:
    key: mop_left
    label: 'Mop (sensor): '
  mop:
    key: mop_left
    label: 'Mop: '
    unit: ' h'

image

igorsantos07 avatar Sep 23 '22 06:09 igorsantos07