Add support for Levoit Classic 300S Smart Ultrasonic Top-Fill Cool Mist Humidifier in the VeSync integration

Hi @formatBCE it does, it took a while to appear i dont know why but its working as intended

Oh, ok. Levoit API sometimes is a bit laggy.
Glad it works. :slight_smile:

Are you planning on adding this to the official VeSync integration?

1 Like

Maybe at some point.
Too many moves to do for pull-request. Have no time for all the formalities.

Hi, I am new here and into home assistant.
Your Intergration worked well for my new Levolit 300S Classic Humidifier, and I can toggle on/off, display on/off and night light on/off. But I do not see a mode selection or sensor - readout like humidity. Do I need to setup a sensor template for that in the config? And how? I got 1 integration with 3 entities, but nothing more. Any help appreciated. Thanks in advance Marcus4Aspern

Hello, and welcome to big and wonderful world of HomeAssistant! :slight_smile:

Mentioned settings are not separate entities, but humidifier entity properties instead.

They can be changed in automations, via calling, e.g., service “humidifier.set_mode”.
Also you may add humidifier to Lovelace, and if you’ll click on it there, you will see UI like on screenshot.

I have been playing around with this further to see if I can integrate the Core 300s. I had a couple of questions - hoping you can help.

  1. I managed to get my Core300s working but the integration adds my purifier as an entity rather than device - is that normal?

  2. I would also love to be able to control both the child lock and display. Do you know how I can expose these controls to HA? Looking at the docs for Core300s, I can pull both in the attributes section via the below but not sure how to add the controls.

VeSyncAir300S400S.display_state() - Return the state of the display (True=On/False=off)

VeSyncAir300S400S.child_lock() - Return the state of the child lock (True=On/False=off)

  1. As per the docs, assuming the ‘air_quality’ is measured in PM 2.5 - ug/m3? Do you know how I could get that to expose the measurement as a sensor? I am also using the Dyson component and it exposes the pm2.5/10 as sensors which are useful.
1 Like

Hi!
I got answer for one of your questions:
Basically every device in official VeSync integration is created as single entity. I intentionally created device for Classic300S humidifier, because I decided it a better way to hold all related entities.
However, I didn’t change existing implementations, hence - they’re just entity-based.

On other questions - I guess, pyvesync library developer is the right person to ask. All functionally in HA integration is just based on pyvesync capabilities.

E.g. on display/child lock - I see there getters, but no setters. That means, they cannot be turned on/off, you just can see their current state. (And, probably, they are present in HA as state arguments.)

Thanks. I will reach out to the pyvesync dev regarding the other questions.

Asking as I am also interested to learn as I have been playing around with it yesterday. How would I change this form an entity to device? Is that something that needs to be controlled from the pyvesync side?

For the getters, I assume that it is these for example

VeSyncAir300S400S.display_state() - Return the state of the display (True=On/False=off)

But could these not be used as the setters?

VeSyncAir300S400S.turn_on_display() Turn display on
VeSyncAir300S400S.turn_off_display() Turn display off

  1. Check out HA_VeSync_Classic300s/humidifier.py at 4f66448d7de604edd62326cf67b517b2fdcf32f7 · formatBCE/HA_VeSync_Classic300s · GitHub - this config should be added to each entity, if you want it to be part of device.

  2. You’re right, there are setters too. Then you can create switch entities for them. Check this:

1 Like

How would you integrate the changes in a container version as I do not see it in any of the home assistant directories? Is there a document somewhere that explains this?

I have a 300s purifier that does not show up in the official integration. My 131S works fine, but the 300s is still not showing up.

My fork should work with 300s.
But to try it, you’ll have to download the code from my repo and put it manually to custom_components folder. Then after HA restart, remove official integration and add mine instead. Should work fine.

Andrii,

Downloaded the code, added the username and password to configuration.yaml / secrets.yaml and it popped into the integrations after a restart. Weirdly it shows my username as the title to the integration. Maybe there is another attribute to add to get that to stop happening.

Time to dig a little deeper
I’m getting more familiar with the peculiarities of HA every day.

Hmm, as far as I can say, you’d want to add integration via config flow (basically, remove any mentions from text configs, go to Configuration->Integrations, find VeSync there and add it there).

It’s working great, @formatBCE. Thanks a lot! :wink:

Just one thing that I’ve been trying to work it out, with the Core 300S. Still no preset mode: auto, fot that model?
The fan’s service (set preset mode), only seems to change for “sleep”.

Hi!
Yes, there was a misunderstanding from start, and I didn’t add auto mode.
It’s easy to do, since it’s supported. I will do it, once have time. Or you may do it yourself in file fan.py (just copy from 400S instead of 200s, like I did) :slight_smile:

Done. Thanks!

Thank you very much for working on this! I just got one of these for a gift and am excited to be able to control it and use in automations.

1 Like

Very very new to home assistant (less than 3 months), not a developer. I’ve read this thread and multiple others threads trying to figure out how to install this for a 400s Air purifier but have had no luck.

I’m unable to get past the first step
 “pip install pyvesync”
My version of home assistant is on a home assistant blue rasberry pi.
I tired copying the extracted zip file from GitHub - webdjoe/pyvesync: pyvesync is a python library to manage Etekcity & Levoit smart devices to my custom components directory and that didn’t work.
I tried the default VeSync integration (just for fun) but that didn’t work as it doesn’t’ support the 400S. Tried to google the pip install and I know it’s a python command for installing packages but that’s it.

Any help for this newb to get past step one would be greatly appreciated, thanks!