Karen
Karen

Reputation: 1

Connecting Lifx light with Python

Error importing class from installed package

I've installed and reinstalled lazylights I've change import to the entire library, but then error: Lifx not defined when creating instance of the class

from lazylights import Lifx
import time

lifx = Lifx(num_bulbs=1)  # so it knows how many to wait for when connecting

@lifx.on_connected
def _connected():
    print "Connected!"

This yields:

ImportError: cannot import name Lifx

Upvotes: 0

Views: 98

Answers (0)

Related Questions