Skip to content

Conversation

@bhamiltoncx
Copy link
Contributor

@bhamiltoncx bhamiltoncx commented Oct 31, 2021

Fixes #95. The Dual 200S humidifer seems identical to the Classic 300S humidifier, except it has no night-light.

Tested with:

% cat test.py
import pyvesync

manager = pyvesync.VeSync("XXX", "XXX", "XXX")
manager.login()
manager.update()

manager.fans[0].display()

% /usr/bin/python3 test.py
Device Name:... Nursery Humidifier
Model: ........ Dual200S       
Subdevice No: . None           
Status: ....... on             
Online: ....... online         
Type: ......... wifi-air       
CID: .......... (snip)
UUID: ......... (snip)
Mode: ....................... auto 
Humidity: ................... 54 percent
Mist Virtual Level: ......... 1 
Mist Level: ................. 1 
Water Lacks: ................ False 
Humidity High: .............. False 
Water Tank Lifted: .......... False 
Display: .................... False 
Automatic Stop Reach Target:  True 
Auto Target Humidity: ....... 58 percent
Automatic Stop: ............. True 

@bhamiltoncx
Copy link
Contributor Author

Not sure why the validation build was cancelled — let me know if there's any action I can take there.

@bhamiltoncx
Copy link
Contributor Author

Friendly ping @webdjoe — anything else I can add here?

@webdjoe
Copy link
Owner

webdjoe commented Nov 18, 2021

Thank you for the PR, do you mind testing? I combined with the 300S class and excluded the night light feature.

@bhamiltoncx
Copy link
Contributor Author

bhamiltoncx commented Nov 18, 2021 via email

@bhamiltoncx
Copy link
Contributor Author

Looks like there's a small typo:

>>> manager.update()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/site-packages/pyvesync-1.4.2-py3.8.egg/pyvesync/vesync.py", line 291, in update
    self.get_devices()
  File "/usr/local/lib/python3.9/site-packages/pyvesync-1.4.2-py3.8.egg/pyvesync/vesync.py", line 240, in get_devices
    proc_return = self.process_devices(device_list)
  File "/usr/local/lib/python3.9/site-packages/pyvesync-1.4.2-py3.8.egg/pyvesync/vesync.py", line 219, in process_devices
    v.append(_device_builder(dev_type, dev, self))
  File "/usr/local/lib/python3.9/site-packages/pyvesync-1.4.2-py3.8.egg/pyvesync/vesync.py", line 73, in _device_builder
    return device_name(config, manager)
  File "/usr/local/lib/python3.9/site-packages/pyvesync-1.4.2-py3.8.egg/pyvesync/vesyncfan.py", line 1073, in __init__
    if 'nightlight' in air_features.get(details.type):
AttributeError: 'dict' object has no attribute 'type'

I've pushed a fix to this PR which makes everything work. Thanks, LMK how it looks.

@webdjoe
Copy link
Owner

webdjoe commented Nov 21, 2021

Great, thank you! Uploading pip package now.

@webdjoe webdjoe merged commit 5607a97 into webdjoe:master Nov 21, 2021
@bhamiltoncx
Copy link
Contributor Author

Wonderful!

@bhamiltoncx bhamiltoncx deleted the Core200S branch November 21, 2021 00:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for Dual 200S Humidifier

2 participants