home-assistant-vacuum-styj02ym icon indicating copy to clipboard operation
home-assistant-vacuum-styj02ym copied to clipboard

Add supplies properties

Open gmag11 opened this issue 3 years ago • 1 comments

Supplies timers names seem to be incorrect. This fixes them so that they are showed on Vacuum Card.

I'm not a skilled Python programmed so maybe this has some faults. Feel free to correct what you consider.

image

My Vacuum Card configuration for your reference:

actions:
  - icon: mdi:silverware-fork-knife
    name: Clean kitchen
    service: script.1586192082530
compact_view: false
entity: vacuum.mi_robot_vacuum_mop
image: default
show_status: true
stats:
  cleaning:
    - attribute: s_area
      subtitle: Área limpia
      unit: m2
    - attribute: s_time
      subtitle: Tiempo limpiado
      unit: minutes
  default:
    - attribute: filter_left
      subtitle: Filtro
      unit: horas
    - attribute: main_brush_left
      subtitle: Rodillo
      unit: horas
    - attribute: side_brush_left
      subtitle: Cepillo
      unit: horas
    - attribute: sensor_dirty_left
      subtitle: Mopa
      unit: horas
type: custom:vacuum-card

gmag11 avatar Jun 04 '21 21:06 gmag11

Hello! Your PR needs some refactoring, this code is not STYJ02YM and STYTJ02YM compatible. My guess it's compatible with china version, EU version doesn't provide necessary attributes and integration crashes :(

KrzysztofHajdamowicz avatar Aug 29 '21 16:08 KrzysztofHajdamowicz