예제 #1
0
def init(empty=False):
    """Initialize the platform with devices."""
    global DEVICES

    DEVICES = ([] if empty else [
        MockToggleDevice("AC", STATE_ON),
        MockToggleDevice("AC", STATE_OFF),
        MockToggleDevice(None, STATE_OFF),
    ])
예제 #2
0
파일: test.py 프로젝트: lumavp/blumate
def init(empty=False):
    """Initalize the platform with devices."""
    global DEVICES

    DEVICES = [] if empty else [
        MockToggleDevice('Ceiling', STATE_ON),
        MockToggleDevice('Ceiling', STATE_OFF),
        MockToggleDevice(None, STATE_OFF)
    ]