benct / lovelace-xiaomi-vacuum-card

Simple card for various robot vacuums in Home Assistant's Lovelace UI
MIT License
261 stars 38 forks source link

Attributes on Valetudo 2021.03.0 #72

Open micdis opened 3 years ago

micdis commented 3 years ago

Hi! since I updated my Valetudos to 2021.03.0 I don't see the attributes anymore. They come over MQTT (sensor.main_brush), but in the Lovelace Card I only see N/A

Am I doing something wrong?

entity: vacuum.rockrobo
type: 'custom:xiaomi-vacuum-card'
vendor: valetudo
name: false
attributes:
  main_brush:
    key: sensor.main_brush
Dinth commented 3 years ago

Same issue here. Before Valetudo was posting brushes status as attributes to vacuum.* entity, now it posts that data as separate entities and i cannot get them to show in the card

dckiller51 commented 3 years ago

Hello, You can put the valutedo re. no problem with. https://github.com/rand256/valetudo

cnopix commented 3 years ago

Hello,

i have the same error :(

how can i resolve without change to valetudo RE ?

Cnopix.

matejzero commented 3 years ago

This seems to be changed in Valetudo 2021.04.0 with the rework of MQTT to better support Homie integration.

Is there any chance to add support to read state from custom sensor and not only attributes?

benct commented 2 years ago

Support for default sensor data has been added to version 4.4.0, but only tested for xiaomi vacuums. Let me know if it works for you or not.

cnopix commented 2 years ago

@benct For me it doesn't work :'(

i need to change something ?

gervaso commented 2 years ago

Hi, it works, you just need to rename the keys in the following way.

type: custom:xiaomi-vacuum-card
entity: vacuum.cinesino
vendor: valetudo
attributes:
  main_brush:
    key: main_brush
    unit: ' m'
  side_brush:
    key: right_brush
    unit: ' m'
  filter:
    key: main_filter
    unit: ' m'
  sensor:
    key: sensor_cleaning
    unit: ' m'

My sensors are named "sensor.cinesino_main_brush", "sensor.cinesino_right_brush" and so on.