marotoweb / home-assistant-vacuum-viomise

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

New enhancements (Secondary cleaning switch and Mopping/sweeping route) #9

Closed kodifan closed 3 years ago

kodifan commented 3 years ago

Halo any chance for adding two more enhancements for this integration?

One more thing: is is possible to read light (vacuum led status) ? You can turn it off or on, but i cant see such property either in your integration or specification file.

marotoweb commented 3 years ago

The two states can be easily implemented, in fact there are more values ​​that could be obtained without significantly decreasing the performance however the led status does not exist in the specifications

kodifan commented 3 years ago

Would be great;) more is always better;)

marotoweb commented 3 years ago

Check out https://github.com/marotoweb/home-assistant-vacuum-viomise/commit/ce38c4d4fc0b4fa3a077aa26f21b9e1bd960028e

kodifan commented 3 years ago

Im new in all this Home Assistant stuffs. So maybe I don't have knowledge to do this correctly but those attributes seems to be read only ? Is it the way to set them ? I don't see any set_route or set_repeat command in your vacuum.py file

marotoweb commented 3 years ago

Hi, I'm Roberto

In fact it is already possible to change any rewritable property values simply using the vacuum.send_command service

Script example:

alias: 'Change  repeat_state (1=on, 0=off)'
sequence:
  - data:
      command: set_properties
      params:
        - siid: 4
          piid: 1
          value: 1
    service: vacuum.send_command
    target:
      entity_id: vacuum.viomi_se
mode: single

imagem

imagem

kodifan commented 3 years ago

Hi Roberto, yes i noticed sorry for my mistake (Krzysztof is a person that you have forked your repository from). Thanks for the tip i will try it for sure. So basically i can set other attributes this way too ? Is it enough for most properties to add them to ALL_PROPS and mapping section (with correct siid and piid of course) in vacuum.py file ?

marotoweb commented 3 years ago

Basically yes, you can confirm in the specifications file which properties can be changed and their values