Completed
Push — master ( 32acac...19ae40 )
by Lakshmi
11:34
created

BaseAction.__init__()   A

Complexity

Conditions 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 5
Bugs 0 Features 0
Metric Value
cc 1
c 5
b 0
f 0
dl 0
loc 3
rs 10
1
from hue import Hue
2
from st2actions.runners.pythonrunner import Action
3
4
5
class BaseAction(Action):
6
    def __init__(self, config):
7
        super(BaseAction, self).__init__(config)
8
        self.hue = self._get_client()
9
10
    def _get_client(self):
11
        hue = Hue()
12
        hue.station_ip = self.config['station_ip']
13
        hue.get_state()
14
15
        return hue
16