Oro / pynanoleaf

A Python3 wrapper for the Nanoleaf API
MIT License
2 stars 5 forks source link

Return no effect when *Solid* value is returned by the device #4

Closed Taosmi closed 3 years ago

Taosmi commented 3 years ago

Canvas device returns the value 'Solid' as current effect selected but there is really no effect selected.

Oro commented 3 years ago

Awesome, thank you! I completely missed that.

Reading the documentation, *Dynamic* and *Static* are also reserved effect names, could you please also add them to return None? Maybe with something like the following and returning None if any of them? I'll release soon afterwards (as version 0.1.0 seeing as this is a breaking change)

RESERVED_EFFECT_NAMES = ["*Solid*", "*Static*", "*Dynamic*"] # These effect names have special meaning and are not directly setable and should not be returned as effect name for Consumers relying on the effect returned to be included in the list of all effects
Taosmi commented 3 years ago

Great. I just added the suggested change and effects and effectSelect on the Info dict to make it easy to use.

keis commented 3 years ago

Nice work @Taosmi