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

LWB004 and LWB010 LUT files created #25

Merged
merged 15 commits into from
Jun 21, 2021
Merged

LWB004 and LWB010 LUT files created #25

merged 15 commits into from
Jun 21, 2021

Conversation

nepozs
Copy link
Contributor

@nepozs nepozs commented Jun 20, 2021

I'm not 100% sure if created files are OK for integration, but I've tried to create them to be possible closest with other LUT files (but they contain only brightness and power wattage).

Brigtness 0 means, bulb off (in standby mode).

Measurements were made manually with a meter of a decent class, with a brightness change every 1%, for greater certainty of measurement repeatability, the LWB004 measurement was made twice.

@bramstroker
Copy link
Owner

bramstroker commented Jun 21, 2021

@nepozs Great job! csv looks good.
One small modification needed. When the light is off the integration will not check the LUT file, but look at the property standby_usage.
You can add this to model.json. Like this:

{
    "name": "Hue Lux E27 750lm",
    "standby_usage": 0.29,
    "supported_modes": [
        "lut"
    ]
}

Also you can remove the 0 row from the CSV.

@bramstroker bramstroker added the new model Support for new light model label Jun 21, 2021
@bramstroker
Copy link
Owner

Could you also add the 2 models to supported list? https://github.com/bramstroker/homeassistant-powercalc/blob/master/README.md#supported-models

@nepozs
Copy link
Contributor Author

nepozs commented Jun 21, 2021

Files corrected, thanks for clarifying usage model.json.

@bramstroker
Copy link
Owner

Thanks. I see one thing which need to change. The CSV files have a header row (bri,watt). The other LUT files don't have that and the code does not expect a header row. So I am pretty sure this will break.
If you can remove the headers rows from both csv's it is ready to merge.

@nepozs
Copy link
Contributor Author

nepozs commented Jun 21, 2021

I'll do it soon, but… I've downloaded one of the existing hs.csv.gz files as a source, unfortunately I don't remember which one (probably LCT012) , and the CSV has a header inside (so I prepared a similar format).

Edit: I've checked hs.csv.gz files and… really only LCT012 has header, so it needs to be corrected.

@bramstroker
Copy link
Owner

Ok thanks for noticing. I will fix the LCT012 file.

@nepozs
Copy link
Contributor Author

nepozs commented Jun 21, 2021

Files corrected (no header).

@bramstroker bramstroker merged commit 7112caa into bramstroker:master Jun 21, 2021
@bramstroker
Copy link
Owner

btw, on closer inspection the headers were needed in the CSV file. The integration skips the first row assuming this is the header, so for almost all the csv files the first row was skipped.
I have altered all the files to include the header and also developed a github action to validate file structure on every merge request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new model Support for new light model
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants