Completed
Pull Request — master (#543)
by
unknown
02:35
created

ToggleAction   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 10
c 0
b 0
f 0
wmc 2
1
from lib import action
2
3
4
class ToggleAction(action.BaseAction):
5
    def run(self, light_id, long_alert=False):
6
        light = self.hue.lights.get(light_id)
7
        if long_alert:
8
            light.alert('lselect')
9
        else:
10
            light.alert()
11