VeSync Air Purifier

Recently, Levoit extended their 131 air purifier model with VeSync integration. I would like to implement whatever is needed to get it into HA. However, there seems to be no official or at least semi-official VeSync API (beyond the one sepcific to wifi outlets). Is anyone aware of VeSync API? (language does not matter).

Hey, I help maintain the vesync integration in HA. I do not have the air purifier to test it myself so was wondering if you would you be willing to assist in getting this integrated? I can likely add support in the near term for what the vesync api claims it needs to work but could definitely use some help to verify. Would you be able to help test when it’s ready?

Damn, somehow I missed this answer. I got in touch with webdjoe who I think is working with you (see https://github.com/webdjoe/pyvesync_v2/issues/4).

I just got one of these today. I can’t get it to show in home assistant for the life of me. All the github issues I see are all merged or closed. I tried removing the integration and rebooting. What am I missing?

I added the custom component and got it up and running. Still not sure how to set sleep mode yet.

In my case I did not use HA component. Instead I have a python script that reports status over MQTT and then I have whatever automations that I need that call another python script to control the device. To put purifier in sleep you have method sleep_mode() in the pyvesync api.

1 Like

I’d be interested in your scripts for sure. I have spent hours now trying to convert webjoe’s pyvesync_v2 into a custom component but I am no developer. So far I have broken HA twice and had to revert to back up. Here is what I have tried so far https://github.com/webdjoe/pyvesync_v2/issues/13

Have you seen this?


Not tried it yet but walks you through integrating the air purifier into home assistant

I’m a total newb to HA.

I have tried to do all suggested but cannot get the sensor to work for the air quality. Capture

I can use the switch on/off but cannot use the sensor of the air quality. vesysnc

All I get is:

Configuration invalidCHECK CONFIGURATION

Component error: platform - Integration ‘platform’ not found. Component error: sensors - Integration ‘sensors’ not found.Capture

Any help would be great :slight_smile:

You need to put sensor: before your sensor config

sensor:
  - platform: template
    sensors:
      levoit_air_quality:
        friendly_name: Levoit Air Quality
        value_template:  {{ state_attr('fan.engelina_s_air_purifier', 'air_quality') }}

:slight_smile:

Thank you for helping.

I’m getting this now:

Error loading /config/configuration.yaml: while parsing a flow mapping
in “/config/configuration.yaml”, line 43, column 26
expected ‘,’ or ‘}’, but got ‘’
in “/config/configuration.yaml”, line 43, column 83

missed comma between flow collection entries at line 43, column 82:
… _s_air_purifier’ , ‘air_quality’) }}
^

Something wrong with indentation?

Put quotes round the value template.

HA

Done that but it’s still not showing it as a sensor. The sensors on the NAS below it works

On checking the config I get the following:

HA Config

On checking the log:

Logger: homeassistant.config
Source: helpers/config_validation.py:748
First occurred: 12:27:07 (1 occurrences)
Last logged: 12:27:07

Unknown error validating config for template platform for sensor component with PLATFORM_SCHEMA
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/config.py”, line 831, in async_process_component_config
p_validated = platform.PLATFORM_SCHEMA(p_config) # type: ignore
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 272, in call
return self._compiled([], data)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 386, in validate_mapping
cval = cvalue(key_path, value)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 817, in validate_callable
return schema(data)
File “/usr/src/homeassistant/homeassistant/helpers/config_validation.py”, line 495, in verify
return cast(Dict, schema(value))
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 272, in call
return self._compiled([], data)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 594, in validate_dict
return base_validate(path, iteritems(data), out)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 386, in validate_mapping
cval = cvalue(key_path, value)
File “/usr/local/lib/python3.8/site-packages/voluptuous/validators.py”, line 215, in _run
return self._exec(self._compiled, value, path)
File “/usr/local/lib/python3.8/site-packages/voluptuous/validators.py”, line 339, in _exec
v = func(path, v)
File “/usr/local/lib/python3.8/site-packages/voluptuous/schema_builder.py”, line 817, in validate_callable
return schema(data)
File “/usr/src/homeassistant/homeassistant/helpers/config_validation.py”, line 748, in validator
if key in config:
TypeError: argument of type ‘NoneType’ is not iterable

Try this format/spacing: (gives me a sensor.levoit_air_quality sensor)

  - platform: template
    sensors:
      levoit_air_quality:
         friendly_name: Tessa's Air Quality
         value_template: '{{ state_attr("fan.tessas_air_purifier", "air_quality") }}'

Is the “air quality” an attribute, as of now, for the 200S?

It seems the official info isn’t updated: the only references are to LV-PUR131S and Core200S; while the Github already has support for 400S.

Hi Mark, any chance of adding the Levoit Humidifiers? I have the 300S series.

2 Likes

would be nice to have

1 Like