-
Notifications
You must be signed in to change notification settings - Fork 72
Conversation
Sorry, maybe it's my setup for the diagnostics downloading error? Doesn't appear to work for me, tried few diff browsers etc. |
No, my fix was not good. I pushed another one to try, and a fix for the PRESET. |
Core 200S (LAP-C201S-AUSR) is discovered via DHCP but no devices or entities are created. Seems like my issues are different from @kasper79 Logs:
Diagnostics: {
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2022.4.7",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.9.9",
"docker": true,
"arch": "x86_64",
"timezone": "America/Chicago",
"os_name": "Linux",
"os_version": "5.10.108",
"supervisor": "2022.04.0",
"host_os": "Home Assistant OS 7.6",
"docker_version": "20.10.9",
"chassis": "vm",
"run_as_root": true
},
"custom_components": {
"hacs": {
"version": "1.24.5",
"requirements": [
"aiogithubapi>=21.11.0"
]
},
"vesync": {
"version": "0.1.3",
"requirements": []
}
},
"integration_manifest": {
"domain": "vesync",
"name": "VeSync",
"documentation": "https://www.home-assistant.io/integrations/vesync",
"codeowners": [
"@markperdue",
"@webdjoe",
"@thegardenmonkey"
],
"config_flow": true,
"iot_class": "cloud_polling",
"version": "0.1.3",
"issue_tracker": "https://github.com/vlebourl/vesync-bpo",
"dhcp": [
{
"hostname": "levoit-*",
"macaddress": "*"
}
],
"is_built_in": false
},
"data": {
"fans": [
{
"device": {
"module": "VeSyncAirBypass",
"models": [
"Core200S",
"LAP-C201S-AUSR",
"LAP-C202S-WUSR"
],
"modes": [
"sleep",
"off"
],
"features": [],
"levels": [
1,
2,
3
]
},
"config": {
"display": false,
"display_forever": false
},
"details": {
"filter_life": 99,
"mode": "manual",
"level": 0,
"display": false,
"child_lock": false,
"night_light": "off",
"display_forever": false
}
}
],
"outlets": [],
"switches": [],
"bulbs": []
}
} |
ok for Core 400S - LAP-C401S-WUSR. I added the device in const.py in my HA instance and also updated the fan.py PRESET_MODES = { the device now shows up in my HA - but the air quality information is wrong. Also Core 400S has a 4 levels of fan speed. But I am only able to go up till 3. |
Thanks for this, could you add your diagnostics so I can see how to get the proper fan speed range from device info? |
I added some improvement to mode and fan speed discovery. Could you guys try it out? |
Newest pull breaks all the air purifiers for me, the humidifier's still show up correctly: Logger: homeassistant.components.fan
Source: custom_components/vesync/fan.py:70
Integration: Fan (documentation, issues)
First occurred: 7:18:49 AM (1 occurrences)
Last logged: 7:18:49 AM
Error while setting up vesync platform for fan
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/vesync/fan.py", line 41, in async_setup_entry
_setup_entities(
File "/config/custom_components/vesync/fan.py", line 53, in _setup_entities
entities.append(VeSyncFanHA(dev))
File "/config/custom_components/vesync/fan.py", line 70, in __init__
self._speed_range = (1, max(self.device.levels))
AttributeError: 'VeSyncAirBypass' object has no attribute 'levels' I have: Attched diagnostics. {
"home_assistant": {
"installation_type": "Home Assistant OS",
"version": "2022.4.7",
"dev": false,
"hassio": true,
"virtualenv": false,
"python_version": "3.9.9",
"docker": true,
"arch": "x86_64",
"timezone": "America/Chicago",
"os_name": "Linux",
"os_version": "5.10.108",
"supervisor": "2022.04.0",
"host_os": "Home Assistant OS 7.6",
"docker_version": "20.10.9",
"chassis": "embedded",
"run_as_root": true
},
"custom_components": {
"minecraft_server": {
"version": "1.0.0",
"requirements": [
"aiodns==2.0.0",
"getmac==0.8.2",
"mcstatus==5.1.1"
]
},
"poolmath": {
"version": "0.1.4",
"requirements": [
"beautifulsoup4>=4.9.0",
"jsonpath>=0.82",
"xmltodict>=0.12.0",
"httpx>=0.16.1"
]
},
"apple_tv": {
"version": "3.0.1",
"requirements": [
"pyatv==0.10.0"
]
},
"ha_hatch": {
"version": "1.2.0",
"requirements": [
"hatch-rest-api==1.10.0"
]
},
"flair": {
"version": "0.0.5.5",
"requirements": [
"hass-flair-helper==0.1.2"
]
},
"ecowitt": {
"version": "0.1.0",
"requirements": [
"pyecowitt==0.12"
]
},
"midea_dehumidifier_lan": {
"version": "0.8.1",
"requirements": [
"midea-beautiful-air==0.9.8"
]
},
"icloud3": {
"version": "2.4.6",
"requirements": []
},
"whistle": {
"version": "0.0.3.4",
"requirements": [
"git+https://github.com/RobertD502/pywhistle@master#pywhistle==0.0.4.1"
]
},
"midea_ac": {
"version": "0.2.3",
"requirements": [
"msmart==0.2.3",
"pycryptodome",
"pycryptodomex",
"click"
]
},
"alexa_media": {
"version": "3.11.2",
"requirements": [
"alexapy==1.25.3",
"packaging>=20.3",
"wrapt>=1.12.1"
]
},
"alarmo": {
"version": "v1.8.7",
"requirements": []
},
"hacs": {
"version": "1.24.5",
"requirements": [
"aiogithubapi>=21.11.0"
]
},
"traeger": {
"version": "2021.09.20",
"requirements": []
},
"mail_and_packages": {
"version": "0.3.4-b23",
"requirements": [
"imageio>=2.9.0",
"python-resize-image>=1.1.19"
]
},
"vesync": {
"version": "0.1.3",
"requirements": []
}
},
"integration_manifest": {
"domain": "vesync",
"name": "VeSync",
"documentation": "https://www.home-assistant.io/integrations/vesync",
"codeowners": [
"@markperdue",
"@webdjoe",
"@thegardenmonkey",
"@vlebourl"
],
"config_flow": true,
"iot_class": "cloud_polling",
"version": "0.1.3",
"issue_tracker": "https://github.com/vlebourl/custom_vesync",
"dhcp": [
{
"hostname": "levoit-*",
"macaddress": "*"
}
],
"is_built_in": false
},
"data": {
"fans": [
{
"device": {
"module": "VeSyncAirBypass",
"models": [
"Core400S",
"LAP-C401S-WJP",
"LAP-C401S-WUSR",
"LAP-C401S-WAAA"
],
"modes": [
"sleep",
"off",
"auto"
],
"features": [
"air_quality"
],
"levels": [
1,
2,
3,
4
]
},
"config": {
"display": true,
"display_forever": true
},
"details": {
"filter_life": 99,
"mode": "manual",
"level": 0,
"display": true,
"child_lock": true,
"night_light": "off",
"ait_quality": 0,
"display_forever": false,
"air_quality": 1
}
},
{
"device": {
"module": "VeSyncAirBypass",
"models": [
"Core400S",
"LAP-C401S-WJP",
"LAP-C401S-WUSR",
"LAP-C401S-WAAA"
],
"modes": [
"sleep",
"off",
"auto"
],
"features": [
"air_quality"
],
"levels": [
1,
2,
3,
4
]
},
"config": {
"display": false,
"display_forever": true
},
"details": {
"filter_life": 83,
"mode": "manual",
"level": 0,
"display": false,
"child_lock": false,
"night_light": "off",
"ait_quality": 0,
"display_forever": false,
"air_quality": 1
}
},
{
"device": {
"module": "VeSyncAirBypass",
"models": [
"Core400S",
"LAP-C401S-WJP",
"LAP-C401S-WUSR",
"LAP-C401S-WAAA"
],
"modes": [
"sleep",
"off",
"auto"
],
"features": [
"air_quality"
],
"levels": [
1,
2,
3,
4
]
},
"config": {
"display": true,
"display_forever": true
},
"details": {
"filter_life": 83,
"mode": "manual",
"level": 0,
"display": true,
"child_lock": false,
"night_light": "off",
"ait_quality": 0,
"display_forever": false,
"air_quality": 1
}
},
{
"device": {
"module": "VeSyncAirBypass",
"models": [
"Core300S",
"LAP-C301S-WJP"
],
"modes": [
"sleep",
"off",
"auto"
],
"features": [
"air_quality"
],
"levels": [
1,
2,
3,
4
]
},
"config": {
"display": true,
"display_forever": true
},
"details": {
"filter_life": 100,
"mode": "manual",
"level": 0,
"display": true,
"child_lock": false,
"night_light": "off",
"ait_quality": 0,
"display_forever": false,
"air_quality": 1
}
},
{
"device": {
"module": "VeSyncAirBypass",
"models": [
"Core600S",
"LAP-C601S-WUS",
"LAP-C601S-WUSR",
"LAP-C601S-WEU"
],
"modes": [
"sleep",
"off",
"auto"
],
"features": [
"air_quality"
],
"levels": [
1,
2,
3,
4
]
},
"config": {
"display": true,
"display_forever": true
},
"details": {
"filter_life": 100,
"mode": "manual",
"level": 0,
"display": true,
"child_lock": false,
"night_light": "off",
"ait_quality": 0,
"display_forever": false,
"air_quality": 1
}
},
{
"device": {
"module": "VeSyncHumid200300S",
"models": [
"Classic300S",
"LUH-A601S-WUSB"
],
"features": [
"nightlight"
],
"mist_modes": [
"auto",
"sleep",
"manual"
],
"mist_levels": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"config": {
"auto_target_humidity": 45,
"display": false,
"automatic_stop": true
},
"details": {
"humidity": 58,
"mist_virtual_level": 1,
"mist_level": 1,
"mode": "auto",
"water_lacks": false,
"humidity_high": false,
"water_tank_lifted": false,
"display": false,
"automatic_stop_reach_target": true,
"night_light_brightness": 0
}
},
{
"device": {
"module": "VeSyncHumid200S",
"models": [
"Classic200S"
],
"features": [],
"mist_modes": [
"auto",
"manual"
],
"mist_levels": [
1,
2,
3,
4,
5,
6,
7,
8,
9
]
},
"config": {
"auto_target_humidity": 45,
"display": false,
"automatic_stop": false
},
"details": {
"humidity": 67,
"mist_virtual_level": 9,
"mist_level": 3,
"mode": "manual",
"water_lacks": false,
"humidity_high": false,
"water_tank_lifted": false,
"display": false,
"automatic_stop_reach_target": false
}
},
{
"device": {},
"config": {},
"details": {
"active_time": 113047,
"filter_life": {
"change": false,
"useHour": 840,
"percent": 79
},
"screen_status": "on",
"level": null,
"air_quality": "excellent"
}
}
],
"outlets": [],
"switches": [],
"bulbs": []
}
} |
I messed up the levels detection. It's tough to get it right without access to the device... |
Sourcery Code Quality Report✅ Merging this PR will increase code quality in the affected files by 0.12%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Include missing air purifiers
Closing #19 (via #15, #16 and #18).