pyvesync: VeSyncHumid200300S.set_display has no effect on Classic 200S humidifier

I’m working on a Home Assistant PR to add support for the Classic 300S humidifiers (https://github.com/home-assistant/core/pull/62907), and I’m adding the Classic 200S now that there’s a new pyvesync release. Almost everything for the 200S works fine, but the display light toggle does not. Invoking set_display has no effect on the 200S humidifier, and details["display"] is always False for the Classic 200S. Everything for the 300S works just fine. Perhaps the 200S has a separate API for its display toggle since it just has a single light, whereas the 300S has a more detailed display?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 30 (30 by maintainers)

Most upvoted comments

I’m fixing this in the latest release, should be out in a couple of days.

On Wed, Feb 16, 2022 at 9:34 AM Nicolas Mowen @.***> wrote:

I have seen the same thing, the app does offer a switch for turning it on and off so it is likely a different API if I had to guess 🤔

— Reply to this email directly, view it on GitHub https://github.com/webdjoe/pyvesync/issues/114#issuecomment-1041555260, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6JJBXPPNGPDAYWJMNXXT3U3OYYRANCNFSM5OIEMR7Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

I’m testing @webdjoe’s air-refactor branch in #121 and from what I can see, set_display is working correctly for my Classic 200S, and updates are occurring in both the VeSync app and physically on the humidifier itself.

Testing notes:

>>> humidifier.device_type
'Classic200S'
>>> humidifier.update()
>>> humidifier.details
{'humidity': 45, 'mist_virtual_level': 1, 'mist_level': 1, 'mode': 'manual', 'water_lacks': False, 'humidity_high': False, 'water_tank_lifted': False, 'display': True, 'automatic_stop_reach_target': False, 'night_light_brightness': 0}
>>> humidifier.set_display(False)
True
>>> humidifier.update()
>>> humidifier.details
{'humidity': 45, 'mist_virtual_level': 1, 'mist_level': 1, 'mode': 'manual', 'water_lacks': False, 'humidity_high': False, 'water_tank_lifted': False, 'display': False, 'automatic_stop_reach_target': False, 'night_light_brightness': 0}
>>> humidifier.set_display(True)
True
>>> humidifier.update()
>>> humidifier.details
{'humidity': 45, 'mist_virtual_level': 1, 'mist_level': 1, 'mode': 'manual', 'water_lacks': False, 'humidity_high': False, 'water_tank_lifted': False, 'display': True, 'automatic_stop_reach_target': False, 'night_light_brightness': 0}
>>> humidifier.turn_off_display()
True
>>> humidifier.update()
>>> humidifier.details
{'humidity': 45, 'mist_virtual_level': 1, 'mist_level': 1, 'mode': 'manual', 'water_lacks': False, 'humidity_high': False, 'water_tank_lifted': False, 'display': False, 'automatic_stop_reach_target': False, 'night_light_brightness': 0}
>>> humidifier.turn_on_display()
True
>>> humidifier.update()
>>> humidifier.details
{'humidity': 45, 'mist_virtual_level': 1, 'mist_level': 1, 'mode': 'manual', 'water_lacks': False, 'humidity_high': False, 'water_tank_lifted': False, 'display': True, 'automatic_stop_reach_target': False, 'night_light_brightness': 0}

By replacing setDisplay with setIndicatorLightSwitch, { 'state': mode } with { 'enabled': mode, 'id': 0 }, and display with indicator_light_switch, I was able to control the display on my humidifier and get the display status (of course the simple replacements break the 300S; this was just a test).