def level(self, level, time=0):
        """(Helper) Set light to specified level"""
        if level <= 0:
            self._elk.send(pf_encode(self._index))
        elif level >= 98:
            self._elk.send(pn_encode(self._index))
        else:
            self._elk.send(pc_encode(self._index, 9, level, time))
def level ( self , level , time = 0 ) : if level <= 0 : self . _elk . send ( pf_encode ( self . _index ) ) elif level >= 98 : self . _elk . send ( pn_encode ( self . _index ) ) else : self . _elk . send ( pc_encode ( self . _index , 9 , level , time ) )
(Helper) Set light to specified level