Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Config appears doubled in API (v1) output for lights #399

Open
cdjm opened this issue Feb 8, 2023 · 1 comment · May be fixed by #407
Open

Config appears doubled in API (v1) output for lights #399

cdjm opened this issue Feb 8, 2023 · 1 comment · May be fixed by #407
Labels
bug Something isn't working confirmed We know what should be done to resolve the issue

Comments

@cdjm
Copy link

cdjm commented Feb 8, 2023

Description

Hello Devs,

When querying the light status by API call the config section of the light appears double nested.
This is different from the output of the official Hue Bridge:

{ "state": { "on": true, "reachable": true, "mode": "homeautomation", "bri": 51, "alert": "none", "ct": 443, "effect": "none", "xy": [0.574, 0.388], "hue": 5279, "sat": 208, "colormode": "ct" }, "name": "Kueche Streifen links", "uniqueid": "8bafe180-1958-48fd-9137-528ed98c28e9", "swupdate": { "state": "noupdates", "lastinstall": "2023-02-08T22:27:50" }, "config": { "config": { "archetype": "sultanbulb", "direction": "omnidirectional", "function": "mixed", "startup": { "configured": true, "mode": "safety" } } }, "capabilities": { "certified": true, "control": { "mindimlevel": 200, "maxlumen": 800, "colorgamut": [[0.6915, 0.3083], [0.17, 0.7], [0.1532, 0.0475]], "colorgamuttype": "C" }, "streaming": { "proxy": true, "renderer": true } }, "type": "Extended color light", "manufacturername": "Signify Netherlands B.V.", "modelid": "Hue lightstrip plus (LST002)", "productname": "Kueche Streifen links", "swversion": "67.101.2" }

with the wrong section being:
"config": { "config": { "archetype": "sultanbulb", "direction": "omnidirectional", "function": "mixed", "startup": { "configured": true, "mode": "safety" } } },

Expected behavior

Output should be similar to that of from the Hue Bridge:

{ "state": { "on": true, "bri": 51, "hue": 7676, "sat": 199, "effect": "none", "xy": [0.5016, 0.4151], "ct": 443, "alert": "select", "colormode": "xy", "mode": "homeautomation", "reachable": true }, "swupdate": { "state": "noupdates", "lastinstall": "2022-12-08T14:00:40" }, "type": "Extended color light", "name": "Kueche Streifen links", "modelid": "LST002", "manufacturername": "Signify Netherlands B.V.", "productname": "Hue lightstrip plus", "capabilities": { "certified": true, "control": { "mindimlevel": 25, "maxlumen": 1600, "colorgamuttype": "C", "colorgamut": [[0.6915, 0.3083], [0.1700, 0.7000], [0.1532, 0.0475]], "ct": { "min": 153, "max": 500 } }, "streaming": { "renderer": true, "proxy": true } }, "config": { "archetype": "huelightstrip", "function": "mixed", "direction": "omnidirectional", "startup": { "mode": "powerfail", "configured": true } }, "uniqueid": "00:17:88:01:01:1c:27:ec-0b", "swversion": "67.101.2" }

Reproduction steps

Query API using i.e.

http://a.b.c.d/api/apiuser/lights/13

Relevant log output

"config": {
        "config": {
            "archetype": "sultanbulb",
            "direction": "omnidirectional",
            "function": "mixed",
            "startup": {
                "configured": true,
                "mode": "safety"
            }
        }
    },

Operating system

HassOS

Install method

HassOS Addon

Version

dev/0.3.0

Dev Version

master@1b50572

Any other information that may be helpful

This bug is not causing any specific issue in my home automation setup but I guess this should be as close as possible to the original API output for a translation layer.

@cdjm cdjm added the bug Something isn't working label Feb 8, 2023
@cdjm cdjm linked a pull request Feb 16, 2023 that will close this issue
@github-actions
Copy link
Contributor

This issue has been marked as stale due to no activity and will be closed in 7 days.

@github-actions github-actions bot added the stale label Apr 10, 2023
@alexyao2015 alexyao2015 added confirmed We know what should be done to resolve the issue and removed stale labels Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed We know what should be done to resolve the issue
Projects
None yet
2 participants