Comments (5)
Or perhaps the current Client#lights
could be renamed to known_lights
and lights
rewritten like so:
def lights
known_lights.select(&:label)
end
from lifx-gem.
If you call Light#color
, #label
or #power
and it doesn't have it cached, it will block and fetch it. Light#inspect/to_s
does not fetch for performance reasons.
from lifx-gem.
If you ran lights.select { |light| light.label =~ /foo/ }
, it will fetch all the labels if they haven't been fetched already
from lifx-gem.
Ah ok. Forget I spoke then :)
from lifx-gem.
:)
from lifx-gem.
Related Issues (20)
- Does not work with Rails HOT 10
- discover! should perform Light::Get at intervals
- Remove uninitialised lights from the lights collection HOT 1
- NoMethodError: undefined method `ipv6_unique_local?' for #<Addrinfo: 127.0.0.1> HOT 3
- Set color when bulb is off, without flashing to old color HOT 11
- Synchronous method timeout errors should be more descriptive HOT 1
- undefined method `parse' for Time:Class (NoMethodError) HOT 5
- LIFX::Client#lights returns list containing extra value that is bad! HOT 1
- Mysterious 000000000000 bulb, and GetMeshFirmware spam HOT 5
- Broadcast packets only get sent on primary network on OS X
- Make TCP connect non-blocking
- Cannot reboot light HOT 6
- How do I create a custom LightCollection? HOT 1
- gateway_connection.rb.write hangs
- How can I make bulb flickering from code ? HOT 3
- Memory leak HOT 10
- GatewayConnection testing is unstable
- Light not appearing via `discover` HOT 3
- The transport manager sends an incorrect packet to the network under Windows
- Firmware 2.0 support? HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lifx-gem.