marotoweb / home-assistant-vacuum-viomise

Hacky Home assistant support for Viomi SE (V-RVCLM21A)
21 stars 3 forks source link

Side brush and main brush hours left and percentage values seems to be swapped #10

Closed kodifan closed 3 years ago

kodifan commented 3 years ago

Hello again.

I noticed that probably values for main and side brush are swapped. I know that id's for mapping those sensors are taken form specification file and seems to be correct but results show swapped values. I can swap it in sensors.yaml file and that is wthat i recently did, but it is little confusing. Here is my sensors.yaml configuration and screenshots from Mi Home App and Home Assistant

  **vacuum_cleanmainbrush_h:
    friendly_name: Vacuum - Main brush hours
    unit_of_measurement: 'h'
    value_template: ' {{states.vacuum.viomise.attributes.main_brush_left}}'
    icon_template: 'mdi:screwdriver'
  vacuum_cleanmainbrush_p:
    friendly_name: Vacuum - Main brush percentage
    unit_of_measurement: '%'
    value_template: ' {{(states.vacuum.viomise.attributes.main_brush_percentage) }}'
    icon_template: 'mdi:screwdriver'
  vacuum_cleansidebrush_h:
    friendly_name: Vacuum - Side brush hours
    unit_of_measurement: 'h'
    value_template: ' {{states.vacuum.viomise.attributes.side_brush_left }}'
    icon_template: 'mdi:screwdriver'
  vacuum_cleansidebrush_p:
    friendly_name: Vacuum - Side brush percentage
    unit_of_measurement: '%'
    value_template: ' {{(states.vacuum.viomise.attributes.side_brush_percentage)}} '
    icon_template: 'mdi:screwdriver'**

Screenshot_20210516-131616_Mi Home

sensors

marotoweb commented 3 years ago

My mistake, fixed in https://github.com/marotoweb/home-assistant-vacuum-viomise/commit/fa8d48a89dbde9fce7bf2359920d6bc2d58e03db

kodifan commented 3 years ago

Thanks now everything is ok :)