Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

Possible to add support for low/high night light levels? #50

Closed
Valdorama opened this issue Aug 30, 2022 · 14 comments
Closed

Possible to add support for low/high night light levels? #50

Valdorama opened this issue Aug 30, 2022 · 14 comments
Labels
bug Something isn't working

Comments

@Valdorama
Copy link

The problem

Some air purifier (and possibly other device) models have night lights that have multiple (usually two) dimming levels. An example is the Core 200s air purifier whose night light can be set to low or high brightness.

The night light is currently implemented as a separate light entity and this works to turn it off and on. On the Core 200s, turning the light entity on turns on the night light on high brightness.

Is there any way to allow the brightness level to be controlled? Not sure how that could be done as a light entity e.g. do light entities support discrete levels rather than just on/off and dimming level?

What version of this integration has the issue?

0.1.16

What version of Home Assistant Core has the issue?

2022.8.7

Diagnostics

Diagnostics
Copy/paste diagnostics here between the starting and ending backticks.

Home Assistant log

Logs
Copy/paste any log here, between the starting and ending backticks.

Additional information

No response

@Valdorama Valdorama added the bug Something isn't working label Aug 30, 2022
@vlebourl
Copy link
Owner

There should be a way as light entities support levels (see the hue integration for instance). Could you add your diagnostics to the thread so I can have a look? I may ask to get access to your device at some point to test the implementation, if that's ok with you.
Cheers

@Valdorama
Copy link
Author

Valdorama commented Aug 31, 2022

Here are the diagnostics with the night light on high brightness:

"data": {
    "fans": [
      {
        "device_name": "Levoit Smart True HEPA Air Purifier",
        "device_image": "https://image.vesync.com/defaultImages/deviceDefaultImages/wifibtonboarding_airpurifier_core200s_us_240.png",
        "cid": "**REDACTED**",
        "connection_status": "online",
        "connection_type": "wifi+BTOnboarding",
        "device_type": "Core200S",
        "type": "wifi-air",
        "uuid": "**REDACTED**",
        "config_module": "WiFiBTOnboarding_AirPurifier_Core200S_US",
        "mac_id": "**REDACTED**",
        "mode": "manual",
        "speed": 1,
        "extension": {
          "airQuality": -1,
          "airQualityLevel": 1,
          "mode": "manual",
          "fanSpeedLevel": "1"
        },
        "current_firm_version": null,
        "sub_device_no": null,
        "config": {
          "display": true,
          "display_forever": false
        },
        "device_status": "off",
        "enabled": false,
        "config_dict": {
          "module": "VeSyncAirBypass",
          "models": [
            "Core200S",
            "LAP-C201S-AUSR",
            "LAP-C202S-WUSR"
          ],
          "modes": [
            "sleep",
            "off"
          ],
          "features": [],
          "levels": [
            1,
            2,
            3
          ]
        },
        "features": [],
        "modes": [
          "sleep",
          "off"
        ],
        "air_quality_feature": false,
        "details": {
          "filter_life": 75,
          "mode": "manual",
          "level": 0,
          "display": false,
          "child_lock": false,
          "night_light": "on",
          "display_forever": false
        }
      }
    ]
  }

Diagnostics with night light on low brightness:

"data": {
    "fans": [
      {
        "device_name": "Levoit Smart True HEPA Air Purifier",
        "device_image": "https://image.vesync.com/defaultImages/deviceDefaultImages/wifibtonboarding_airpurifier_core200s_us_240.png",
        "cid": "**REDACTED**",
        "connection_status": "online",
        "connection_type": "wifi+BTOnboarding",
        "device_type": "Core200S",
        "type": "wifi-air",
        "uuid": "**REDACTED**",
        "config_module": "WiFiBTOnboarding_AirPurifier_Core200S_US",
        "mac_id": "**REDACTED**",
        "mode": "manual",
        "speed": 1,
        "extension": {
          "airQuality": -1,
          "airQualityLevel": 1,
          "mode": "manual",
          "fanSpeedLevel": "1"
        },
        "current_firm_version": null,
        "sub_device_no": null,
        "config": {
          "display": true,
          "display_forever": false
        },
        "device_status": "off",
        "enabled": false,
        "config_dict": {
          "module": "VeSyncAirBypass",
          "models": [
            "Core200S",
            "LAP-C201S-AUSR",
            "LAP-C202S-WUSR"
          ],
          "modes": [
            "sleep",
            "off"
          ],
          "features": [],
          "levels": [
            1,
            2,
            3
          ]
        },
        "features": [],
        "modes": [
          "sleep",
          "off"
        ],
        "air_quality_feature": false,
        "details": {
          "filter_life": 75,
          "mode": "manual",
          "level": 0,
          "display": false,
          "child_lock": false,
          "night_light": "dim",
          "display_forever": false
        }
      }
    ]
  }

@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

'There hasn't been any activity on this issue recently. Is this issue still present?
Please make sure to update to the latest Home Assistant version and version of this integration to see if that solves the issue. Let us know if that works for you by adding a comment 👍.
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.'

@vlebourl
Copy link
Owner

vlebourl commented Sep 8, 2022

Still active.

@Valdorama
Copy link
Author

Is this still active..?

@vlebourl
Copy link
Owner

haven't had any time to look into it...
I'll reopen

@vlebourl vlebourl reopened this Sep 16, 2022
@Valdorama
Copy link
Author

Thank you. No rush at all, appreciate your efforts.

@vlebourl
Copy link
Owner

looks fairly easy actually!

@vlebourl
Copy link
Owner

Could you try the branch and let me know whether that works?

@Valdorama
Copy link
Author

Do I just replace light.py with the version from the branch and reload the integration?

@Valdorama
Copy link
Author

I replaced light.py and I can now control the brightness of the nightlight (even though it's really only two levels):

image

Thank you!

@vlebourl
Copy link
Owner

if that's usable enough, I'll publish it as is.

@Valdorama
Copy link
Author

Yes, it's usable enough for me.

@vlebourl
Copy link
Owner

closed by #52.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants