delfick / photons

Python3.6+ asyncio framework for interacting with LIFX devices

Home Page:https://photons.delfick.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add new products to registry

Djelibeybi opened this issue Β· comments

The upstream product registry just got updated with the latest outdoor and other devices so it would be super peachy keen if Photons' registry were updated accordingly.

I'd do it myself but I'm not entirely sure what LCM generation some/all of these devices are, which makes adding them somewhat problematic.

Also, there is an error with two of the product definitions for which I've opened an upstreanm issue: LIFX/products#30 -- I have manually updated my equivalent PR for aiolifx accordingly but I can understand waiting until upstream fix the issue before merging the change.

Sounds like a reasonable plan. Do you want to do that or should I?

Aside: is/was there a way to generate the registry automatically/programatically from the products.json file? There is for aiolifx and I could've sworn there was for Photons too, but now I can't find it, so πŸ€·πŸ»β€β™‚οΈ

Creating it automatically would be a lot simpler if we replaced the array key with something like the pid instead of the LCM string, but I'm unsure if that would break anything significantly.

Given the fact that new LIFX devices are coming out in a steady stream now, it makes more sense to me to spend a bit of time creating an generator script instead of manually adding the new products.

I'm happy to take a stab at that, but I already know you'll do it quicker, more elegantly and with way more Pythonic code. πŸ˜‰

Fair enough. I'll give it a whirl over the next couple of days as time permits.

Fair enough. I'll give it a whirl over the next couple of days as time permits.

This week was and next week will be a write-off because of various physical health issues and such, so I'm not going to get to this for a few weeks at least.

all good, this project lives in a state of negative time pressure

If it weren't for last minute panic, I'd never get anything done.