12 lines
430 B
Python
12 lines
430 B
Python
|
#!/usr/bin/env python3
|
||
|
# -*- coding: utf-8 -*-
|
||
|
from tinge import Tinge
|
||
|
|
||
|
if __name__ == "__main__":
|
||
|
m_tinge = Tinge()
|
||
|
bridge = m_tinge.get_bridges()[0]
|
||
|
for light in bridge.get_lights():
|
||
|
print("Light: {} is reachable: {} and on:{}".format(light, light.is_reachable(), light.is_on()))
|
||
|
light.toggle()
|
||
|
print("Light: {} is reachable: {} and on:{}".format(light, light.is_reachable(), light.is_on()))
|